summaryrefslogtreecommitdiff
path: root/tests/coveragetest.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-11-11 07:23:36 -0500
committerNed Batchelder <ned@nedbatchelder.com>2021-11-11 07:23:36 -0500
commit1b94835aac3268a32bfa4ce0df585dbb97457a06 (patch)
treeadbc0aa1467460588e77aa6d574e1ae9abb74f0f /tests/coveragetest.py
parent79f9f4575321fafc2ef770e3255f874db3d4b037 (diff)
downloadpython-coveragepy-git-1b94835aac3268a32bfa4ce0df585dbb97457a06.tar.gz
style: convert more string formatting to f-strings
Diffstat (limited to 'tests/coveragetest.py')
-rw-r--r--tests/coveragetest.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/coveragetest.py b/tests/coveragetest.py
index 0960722b..52b0a6ab 100644
--- a/tests/coveragetest.py
+++ b/tests/coveragetest.py
@@ -275,13 +275,11 @@ class CoverageTest(
def assert_exists(self, fname):
"""Assert that `fname` is a file that exists."""
- msg = "File %r should exist" % fname
- assert os.path.exists(fname), msg
+ assert os.path.exists(fname), f"File {fname!r} should exist"
def assert_doesnt_exist(self, fname):
"""Assert that `fname` is a file that doesn't exist."""
- msg = "File %r shouldn't exist" % fname
- assert not os.path.exists(fname), msg
+ assert not os.path.exists(fname), f"File {fname!r} shouldn't exist"
def assert_file_count(self, pattern, count):
"""Assert that there are `count` files matching `pattern`."""