Skip to content

Commit

Permalink
Remove unreliable bit from regex
Browse files Browse the repository at this point in the history
  • Loading branch information
pvandyken committed Jul 13, 2024
1 parent f993810 commit 2bb9ba9
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions snakebids/tests/test_plugins/test_component_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,7 @@ def test_filter_with_invalid_spec(

with pytest.raises(
FilterParseError,
match=re.compile(
rf"':{re.escape(flag.lower())}' is not a valid filter method"
),
match=re.compile(r"is not a valid filter method"),
):
p.parse_args(argv)

Expand All @@ -207,7 +205,7 @@ def test_filter_with_missing_value_errors(

with pytest.raises(
FilterParseError,
match=re.compile(rf"':{re.escape(flag.lower())}' requires a value"),
match=re.compile(rf"':{flag}' requires a value"),
):
p.parse_args(argv)

Expand All @@ -230,9 +228,7 @@ def test_boolean_filter_with_value_errors(

with pytest.raises(
FilterParseError,
match=re.compile(
rf"'entity:{re.escape(flag.lower())}' should not be given a value"
),
match=re.compile(rf"'entity:{flag}' should not be given a value"),
):
p.parse_args(argv)

Expand Down

0 comments on commit 2bb9ba9

Please sign in to comment.