Skip to content

Commit b41d75b

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

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
@@ -868,7 +868,7 @@ def test_no_toml_installed_pyproject_toml(self, filename) -> None:
868868
xyzzy = 17
869869
""")
870870
with mock.patch.object(coverage.tomlconfig, "has_tomllib", False):
871-
msg = "Can't read '{filename}' without TOML support"
871+
msg = f"Can't read '{filename}' without TOML support"
872872
with pytest.raises(ConfigError, match=msg):
873873
coverage.Coverage()
874874

@@ -882,7 +882,7 @@ def test_no_toml_installed_pyproject_toml_shorter_syntax(self, filename) -> None
882882
run.parallel = true
883883
""")
884884
with mock.patch.object(coverage.tomlconfig, "has_tomllib", False):
885-
msg = "Can't read '{filename}' without TOML support"
885+
msg = f"Can't read '{filename}' without TOML support"
886886
with pytest.raises(ConfigError, match=msg):
887887
coverage.Coverage()
888888

0 commit comments

Comments
 (0)