Skip to content

Commit

Permalink
Fix failures
Browse files Browse the repository at this point in the history
Signed-off-by: Bernát Gábor <[email protected]>
  • Loading branch information
gaborbernat committed Jan 21, 2025
1 parent 6a71de0 commit 2c8173f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/config/loader/ini/replace/test_replace_tox_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def test_replace_from_tox_section_missing_value(tox_ini_conf: ToxIniCreator) ->
def test_replace_from_section_bad_type(tox_ini_conf: ToxIniCreator) -> None:
conf_a = tox_ini_conf("[testenv:e]\nx = {[m]a}\n[m]\na=w\n").get_env("e")
conf_a.add_config(keys="x", of_type=int, default=1, desc="d")
with pytest.raises(ValueError, match="invalid literal.*w.*"):
with pytest.raises(ValueError, match=r"invalid literal.*w.*"):
assert conf_a["x"]


Expand Down
4 changes: 2 additions & 2 deletions tests/config/loader/test_toml_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_toml_loader_list_ok() -> None:


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


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


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


Expand Down
2 changes: 1 addition & 1 deletion tests/tox_env/python/pip/req/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def test_requirements_file_missing(tmp_path: Path) -> None:
requirements_file = tmp_path / "req.txt"
requirements_file.write_text("-r one.txt")
req_file = RequirementsFile(requirements_file, constraint=False)
with pytest.raises(ValueError, match="No such file or directory: .*one.txt"):
with pytest.raises(ValueError, match=r"No such file or directory: .*one.txt"):
assert req_file.options


Expand Down

0 comments on commit 2c8173f

Please sign in to comment.