Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0deeb4 commit d61d860Copy full SHA for d61d860
1 file changed
Lib/test/test_compile.py
@@ -545,10 +545,9 @@ def check_limit(prefix, repeated):
545
def test_null_terminated(self):
546
# The source code is null-terminated internally, but bytes-like
547
# objects are accepted, which could be not terminated.
548
- # Exception changed from TypeError to ValueError in 3.5
549
- with self.assertRaisesRegex(Exception, "cannot contain null"):
+ with self.assertRaisesRegex(ValueError, "cannot contain null"):
550
compile("123\x00", "<dummy>", "eval")
551
552
compile(memoryview(b"123\x00"), "<dummy>", "eval")
553
code = compile(memoryview(b"123\x00")[1:-1], "<dummy>", "eval")
554
self.assertEqual(eval(code), 23)
0 commit comments