Skip to content

Commit d6ba124

Browse files
committed
fix(tests): use raw string notation for regex in exception matchers
Signed-off-by: Daniel Biehl <dbiehl@live.de>
1 parent a153ecd commit d6ba124

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/robotcode/robot/config/test_profile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def test_if_profile_is_not_defined_an_error_is_raised() -> None:
113113

114114
with pytest.raises(
115115
ValueError,
116-
match="Can't find any configuration profiles matching the pattern 'nonexistent'.",
116+
match=r"Can't find any configuration profiles matching the pattern 'nonexistent'.",
117117
):
118118
config.combine_profiles("nonexistent")
119119

@@ -242,7 +242,7 @@ def test_profiles_enabled_cant_be_an_invalid_condition() -> None:
242242
"""
243243
config = load_robot_config_from_robot_toml_str(data)
244244
os.environ["CI"] = "true"
245-
with pytest.raises(ValueError, match=".*invalid syntax.*"):
245+
with pytest.raises(ValueError, match=r".*invalid syntax.*"):
246246
config.combine_profiles("*")
247247

248248

@@ -372,5 +372,5 @@ def test_type_that_wants_alist_should_throw_an_error() -> None:
372372
[listeners]
373373
listener_with_colon = "dummy:output"
374374
"""
375-
with pytest.raises(TypeError, match=".*Value '.*' must be of type.*"):
375+
with pytest.raises(TypeError, match=r".*Value '.*' must be of type.*"):
376376
load_robot_config_from_robot_toml_str(data)

0 commit comments

Comments
 (0)