Skip to content

Commit 8f8c3d3

Browse files
committed
Use raw strings for regex patterns with \[.
This was causing some warnings in the test suite.
1 parent 45d82be commit 8f8c3d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_server_config_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ def test_unimportable_modules():
109109

110110
with pytest.raises(
111111
ThingImportFailure,
112-
match="\[RuntimeError\] This module should not be importable!",
112+
match=r"\[RuntimeError\] This module should not be importable!",
113113
):
114114
# This checks RuntimErrors get reported with a single error
115115
ThingConfig(cls="tests.unimportable.runtimeerror:SomeClass")
116116

117117
with pytest.raises(
118118
ThingImportFailure,
119-
match="\[ValueError\] This module should not be importable due to ValueError!",
119+
match=r"\[ValueError\] This module should not be importable due to ValueError!",
120120
):
121121
# This checks ValueErrors get reported with a single error
122122
# rather than getting swallowed by a ValidationError

0 commit comments

Comments
 (0)