diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-07-10 09:37:30 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-07-10 09:37:30 (GMT) |
commit | f9efb8b18b689ff5ef7f12e6124f21532d799516 (patch) | |
tree | 17ae9815406dabe43fd8dc28c0869a1f8038d14b /Lib/test/test_bytes.py | |
parent | 95750b1ca535a9883d483ee82b4373fb47d82bc5 (diff) | |
download | cpython-f9efb8b18b689ff5ef7f12e6124f21532d799516.zip cpython-f9efb8b18b689ff5ef7f12e6124f21532d799516.tar.gz cpython-f9efb8b18b689ff5ef7f12e6124f21532d799516.tar.bz2 |
Issue #27474: Unified error messages in the __contains__ method of bytes and
bytearray for integers in and out of the Py_ssize_t range.
Patch by Xiang Zhang.
Diffstat (limited to 'Lib/test/test_bytes.py')
-rw-r--r-- | Lib/test/test_bytes.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index 05dc26a..129b4ab 100644 --- a/Lib/test/test_bytes.py +++ b/Lib/test/test_bytes.py @@ -269,6 +269,7 @@ class BaseBytesTest: self.assertNotIn(200, b) self.assertRaises(ValueError, lambda: 300 in b) self.assertRaises(ValueError, lambda: -1 in b) + self.assertRaises(ValueError, lambda: sys.maxsize+1 in b) self.assertRaises(TypeError, lambda: None in b) self.assertRaises(TypeError, lambda: float(ord('a')) in b) self.assertRaises(TypeError, lambda: "a" in b) |