summaryrefslogtreecommitdiff
path: root/Lib/test/test_bytes.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-07-10 12:37:30 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2016-07-10 12:37:30 +0300
commitf9efb8b18b689ff5ef7f12e6124f21532d799516 (patch)
tree17ae9815406dabe43fd8dc28c0869a1f8038d14b /Lib/test/test_bytes.py
parent95750b1ca535a9883d483ee82b4373fb47d82bc5 (diff)
downloadcpython-git-f9efb8b18b689ff5ef7f12e6124f21532d799516.tar.gz
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.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py
index 05dc26afaf..129b4abf33 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)