[Python-checkins] cpython (merge 3.5 -> default): Issue #24802: Merge ValueError test case from 3.5
martin.panter
python-checkins at python.org
Sun Nov 8 06:30:42 EST 2015
https://hg.python.org/cpython/rev/96cdd2532034
changeset: 99012:96cdd2532034
parent: 99010:7368b86432c6
parent: 99011:a13d9656f954
user: Martin Panter <vadmium+py at gmail.com>
date: Sun Nov 08 11:09:37 2015 +0000
summary:
Issue #24802: Merge ValueError test case from 3.5
files:
Lib/test/test_compile.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -545,10 +545,9 @@
def test_null_terminated(self):
# The source code is null-terminated internally, but bytes-like
# objects are accepted, which could be not terminated.
- # Exception changed from TypeError to ValueError in 3.5
- with self.assertRaisesRegex(Exception, "cannot contain null"):
+ with self.assertRaisesRegex(ValueError, "cannot contain null"):
compile("123\x00", "<dummy>", "eval")
- with self.assertRaisesRegex(Exception, "cannot contain null"):
+ with self.assertRaisesRegex(ValueError, "cannot contain null"):
compile(memoryview(b"123\x00"), "<dummy>", "eval")
code = compile(memoryview(b"123\x00")[1:-1], "<dummy>", "eval")
self.assertEqual(eval(code), 23)
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list