Skip to content

Commit 9378e85

Browse files
Add f-string for error message
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
1 parent 89095bb commit 9378e85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ def test_no_toml_installed_pyproject_toml(self, filename) -> None:
808808
xyzzy = 17
809809
""")
810810
with mock.patch.object(coverage.tomlconfig, "has_tomllib", False):
811-
msg = "Can't read '{filename}' without TOML support"
811+
msg = f"Can't read '{filename}' without TOML support"
812812
with pytest.raises(ConfigError, match=msg):
813813
coverage.Coverage()
814814

@@ -822,7 +822,7 @@ def test_no_toml_installed_pyproject_toml_shorter_syntax(self, filename) -> None
822822
run.parallel = true
823823
""")
824824
with mock.patch.object(coverage.tomlconfig, "has_tomllib", False):
825-
msg = "Can't read '{filename}' without TOML support"
825+
msg = f"Can't read '{filename}' without TOML support"
826826
with pytest.raises(ConfigError, match=msg):
827827
coverage.Coverage()
828828

0 commit comments

Comments
 (0)