diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-05-01 18:25:06 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-05-02 07:38:19 -0400 |
commit | ddf5ba8cfcfe7d133ddbf888cc6e3af79863c712 (patch) | |
tree | 5cd11a9f699ec93711422b00b519d096b1135ff3 /tests/test_execfile.py | |
parent | 4c4ba2e0bc9ec663fa3772d2b088f736345a65a1 (diff) | |
download | python-coveragepy-git-ddf5ba8cfcfe7d133ddbf888cc6e3af79863c712.tar.gz |
refactor: pyupgrade --py36-plus tests/**.py
Diffstat (limited to 'tests/test_execfile.py')
-rw-r--r-- | tests/test_execfile.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_execfile.py b/tests/test_execfile.py index ec8cd180..7c63ac15 100644 --- a/tests/test_execfile.py +++ b/tests/test_execfile.py @@ -86,7 +86,7 @@ class RunFileTest(CoverageTest): def test_no_such_file(self): path = python_reported_file('xyzzy.py') - msg = re.escape("No file to run: '{}'".format(path)) + msg = re.escape(f"No file to run: '{path}'") with pytest.raises(NoSource, match=msg): run_python_file(["xyzzy.py"]) @@ -160,7 +160,7 @@ class RunPycFileTest(CoverageTest): def test_no_such_pyc_file(self): path = python_reported_file('xyzzy.pyc') - msg = re.escape("No file to run: '{}'".format(path)) + msg = re.escape(f"No file to run: '{path}'") with pytest.raises(NoCode, match=msg): run_python_file(["xyzzy.pyc"]) @@ -173,7 +173,7 @@ class RunPycFileTest(CoverageTest): path = python_reported_file('binary') msg = ( - re.escape("Couldn't run '{}' as Python code: ".format(path)) + + re.escape(f"Couldn't run '{path}' as Python code: ") + r"(TypeError|ValueError): " r"(" r"compile\(\) expected string without null bytes" # for py2 |