Skip to content

Commit

Permalink
Update test_rules.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Sep 20, 2024
1 parent 0afce3c commit e32984c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/schemacode/bidsschematools/tests/test_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def test_entity_rule(schema_obj):
nii_rule = rules._entity_rule(rule, schema_obj)
assert nii_rule == {
"regex": (
r"sub-(?P<subject>[0-9a-zA-Z]+)/"
r"(?:ses-(?P<session>[0-9a-zA-Z]+)/)?"
r"sub-(?P<subject>[0-9a-zA-Z+]+)/"
r"(?:ses-(?P<session>[0-9a-zA-Z+]+)/)?"
r"(?P<datatype>anat)/"
r"(?(subject)sub-(?P=subject)_)"
r"(?(session)ses-(?P=session)_)"
Expand Down Expand Up @@ -50,8 +50,8 @@ def test_entity_rule(schema_obj):
json_rule = rules._entity_rule(rule, schema_obj)
assert json_rule == {
"regex": (
r"(?:sub-(?P<subject>[0-9a-zA-Z]+)/)?"
r"(?:ses-(?P<session>[0-9a-zA-Z]+)/)?"
r"(?:sub-(?P<subject>[0-9a-zA-Z+]+)/)?"
r"(?:ses-(?P<session>[0-9a-zA-Z+]+)/)?"
r"(?:(?P<datatype>anat)/)?"
r"(?(subject)sub-(?P=subject)_)"
r"(?(session)ses-(?P=session)_)"
Expand Down

0 comments on commit e32984c

Please sign in to comment.