summaryrefslogtreecommitdiff
path: root/tests/test_oddball.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-05-01 18:25:06 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-05-02 07:38:19 -0400
commitddf5ba8cfcfe7d133ddbf888cc6e3af79863c712 (patch)
tree5cd11a9f699ec93711422b00b519d096b1135ff3 /tests/test_oddball.py
parent4c4ba2e0bc9ec663fa3772d2b088f736345a65a1 (diff)
downloadpython-coveragepy-git-ddf5ba8cfcfe7d133ddbf888cc6e3af79863c712.tar.gz
refactor: pyupgrade --py36-plus tests/**.py
Diffstat (limited to 'tests/test_oddball.py')
-rw-r--r--tests/test_oddball.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/test_oddball.py b/tests/test_oddball.py
index 2e438396..d6a14f9f 100644
--- a/tests/test_oddball.py
+++ b/tests/test_oddball.py
@@ -271,7 +271,7 @@ class PyexpatTest(CoverageTest):
# Make sure pyexpat isn't recorded as a source file.
# https://github.com/nedbat/coveragepy/issues/419
files = cov.get_data().measured_files()
- msg = "Pyexpat.c is in the measured files!: %r:" % (files,)
+ msg = f"Pyexpat.c is in the measured files!: {files!r}:"
assert not any(f.endswith("pyexpat.c") for f in files), msg
@@ -573,8 +573,7 @@ class MockingProtectionTest(CoverageTest):
# StopIteration error.
self.make_file("bug416.py", """\
import os.path
-
- import mock
+ from unittest import mock
@mock.patch('os.path.exists')
def test_path_exists(mock_exists):