diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-10-10 07:46:35 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-10-10 07:46:35 -0400 |
commit | b5ddfd9ad9978211006588934bc25e93d2ba8023 (patch) | |
tree | 4ba05f6f0312ee88b42638a0235f32c39607922e /tests/test_execfile.py | |
parent | 267622b11b730ec69bf34202fc6258a2614394c5 (diff) | |
download | python-coveragepy-git-b5ddfd9ad9978211006588934bc25e93d2ba8023.tar.gz |
refactor: remove a Python 2 thing
Diffstat (limited to 'tests/test_execfile.py')
-rw-r--r-- | tests/test_execfile.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/test_execfile.py b/tests/test_execfile.py index c0ed2d48..5c01f892 100644 --- a/tests/test_execfile.py +++ b/tests/test_execfile.py @@ -165,12 +165,7 @@ class RunPycFileTest(CoverageTest): path = python_reported_file('binary') msg = ( re.escape(f"Couldn't run '{path}' as Python code: ") + - r"(TypeError|ValueError): " - r"(" - r"compile\(\) expected string without null bytes" # for py2 - r"|" - r"source code string cannot contain null bytes" # for py3 - r")" + r"(TypeError|ValueError): source code string cannot contain null bytes" ) with pytest.raises(Exception, match=msg): run_python_file([bf]) |