Skip to content

Commit 2c8173f

Browse files
committed
Fix failures
Signed-off-by: Bernát Gábor <[email protected]>
1 parent 6a71de0 commit 2c8173f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/config/loader/ini/replace/test_replace_tox_env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def test_replace_from_tox_section_missing_value(tox_ini_conf: ToxIniCreator) ->
189189
def test_replace_from_section_bad_type(tox_ini_conf: ToxIniCreator) -> None:
190190
conf_a = tox_ini_conf("[testenv:e]\nx = {[m]a}\n[m]\na=w\n").get_env("e")
191191
conf_a.add_config(keys="x", of_type=int, default=1, desc="d")
192-
with pytest.raises(ValueError, match="invalid literal.*w.*"):
192+
with pytest.raises(ValueError, match=r"invalid literal.*w.*"):
193193
assert conf_a["x"]
194194

195195

tests/config/loader/test_toml_loader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def test_toml_loader_list_ok() -> None:
6363

6464

6565
def test_toml_loader_list_nok() -> None:
66-
with pytest.raises(TypeError, match="{} is not list"):
66+
with pytest.raises(TypeError, match=r"{} is not list"):
6767
perform_load({}, List[str])
6868

6969

@@ -77,7 +77,7 @@ def test_toml_loader_dict_ok() -> None:
7777

7878

7979
def test_toml_loader_dict_nok() -> None:
80-
with pytest.raises(TypeError, match="{'a'} is not dictionary"):
80+
with pytest.raises(TypeError, match=r"{'a'} is not dictionary"):
8181
perform_load({"a"}, Dict[str, str])
8282

8383

tests/tox_env/python/pip/req/test_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def test_requirements_file_missing(tmp_path: Path) -> None:
401401
requirements_file = tmp_path / "req.txt"
402402
requirements_file.write_text("-r one.txt")
403403
req_file = RequirementsFile(requirements_file, constraint=False)
404-
with pytest.raises(ValueError, match="No such file or directory: .*one.txt"):
404+
with pytest.raises(ValueError, match=r"No such file or directory: .*one.txt"):
405405
assert req_file.options
406406

407407

0 commit comments

Comments
 (0)