Skip to content

Commit b5ddfd9

Browse files
committed
refactor: remove a Python 2 thing
1 parent 267622b commit b5ddfd9

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

tests/test_execfile.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,7 @@ def test_running_py_from_binary(self):
165165
path = python_reported_file('binary')
166166
msg = (
167167
re.escape(f"Couldn't run '{path}' as Python code: ") +
168-
r"(TypeError|ValueError): "
169-
r"("
170-
r"compile\(\) expected string without null bytes" # for py2
171-
r"|"
172-
r"source code string cannot contain null bytes" # for py3
173-
r")"
168+
r"(TypeError|ValueError): source code string cannot contain null bytes"
174169
)
175170
with pytest.raises(Exception, match=msg):
176171
run_python_file([bf])

0 commit comments

Comments
 (0)