Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 10, 2024
1 parent 523bc55 commit 29b1fe8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/unit_tests/test_general.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@ def test_check_name_slashes_fail():
# the latest version of HDMF/PyNWB forbids "/" in the object names when creating a new object
# so we use in_construct_mode=True to simulate creating an object that was read from a file
table = DynamicTable.__new__(DynamicTable, in_construct_mode=True)
table.__init__(name=f"test/ing", description="")
table.__init__(name="test/ing", description="")
assert check_name_slashes(neurodata_object=table) == InspectorMessage(
message="Object name contains slashes.",
importance=Importance.CRITICAL,
check_function_name="check_name_slashes",
object_type="DynamicTable",
object_name=f"test/ing",
object_name="test/ing",
location="/",
)
table = DynamicTable(name=f"test\\ing", description="")

table = DynamicTable(name="test\\ing", description="")
assert check_name_slashes(neurodata_object=table) == InspectorMessage(
message="Object name contains slashes.",
importance=Importance.CRITICAL,
check_function_name="check_name_slashes",
object_type="DynamicTable",
object_name=f"test\\ing",
object_name="test\\ing",
location="/",
)

Expand All @@ -43,13 +43,13 @@ def test_check_name_slashes_fail():
# the latest version of HDMF/PyNWB forbids ":" in the object names when creating a new object
# so we use in_construct_mode=True to simulate creating an object that was read from a file
table = DynamicTable.__new__(DynamicTable, in_construct_mode=True)
table.__init__(name=f"test:ing", description="")
table.__init__(name="test:ing", description="")
assert check_name_colons(neurodata_object=table) == InspectorMessage(
message="Object name contains colons.",
importance=Importance.BEST_PRACTICE_SUGGESTION,
check_function_name="check_name_colons",
object_type="DynamicTable",
object_name=f"test:ing",
object_name="test:ing",
location="/",
)

Expand Down

0 comments on commit 29b1fe8

Please sign in to comment.