From b5ddfd9ad9978211006588934bc25e93d2ba8023 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 10 Oct 2021 07:46:35 -0400 Subject: refactor: remove a Python 2 thing --- tests/test_execfile.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'tests') 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]) -- cgit v1.2.1