summaryrefslogtreecommitdiff
path: root/tests/goldtest.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-07-28 17:29:52 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-07-28 17:29:52 -0400
commitc5c1ba084b0b548ff8869cbc086e81608c329eb6 (patch)
tree6b2457d8a63aaccd0099b1e5fc2592caf7e44ac5 /tests/goldtest.py
parent82213596f5301981ea59c3067f8738ff9dd54bbc (diff)
downloadpython-coveragepy-git-c5c1ba084b0b548ff8869cbc086e81608c329eb6.tar.gz
refactor: convert %-strings to f-strings
Diffstat (limited to 'tests/goldtest.py')
-rw-r--r--tests/goldtest.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/goldtest.py b/tests/goldtest.py
index 7321166c..cd946efb 100644
--- a/tests/goldtest.py
+++ b/tests/goldtest.py
@@ -109,7 +109,7 @@ def compare(
for f in actual_only:
save_mismatch(f)
- assert not text_diff, "Files differ: %s" % '\n'.join(text_diff)
+ assert not text_diff, "Files differ: " + "\n".join(text_diff)
assert not expected_only, f"Files in {expected_dir} only: {expected_only}"
if not actual_extra:
@@ -152,7 +152,7 @@ def contains_any(filename, *strlist):
return
assert False, ( # pragma: only failure
- "Missing content in %s: %r [1 of %d]" % (filename, strlist[0], len(strlist),)
+ f"Missing content in {filename}: {strlist[0]!r} [1 of {len(strlist)}]"
)