summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bytes.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-04-16 22:35:38 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-04-16 22:35:38 (GMT)
commit821a8ea39fb93095cc06c0cd9ef4ce498af73ab3 (patch)
tree14a918a5546598aa71781865dcc4cd9e7790c2b4 /Lib/test/test_bytes.py
parent5c4e292c14b71bfecb45e39f501329a71254b2cc (diff)
downloadcpython-821a8ea39fb93095cc06c0cd9ef4ce498af73ab3.zip
cpython-821a8ea39fb93095cc06c0cd9ef4ce498af73ab3.tar.gz
cpython-821a8ea39fb93095cc06c0cd9ef4ce498af73ab3.tar.bz2
have a clear error when passing something > sys.maxsize to bytearray
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 dfd6a1e..516d6d9 100644
--- a/Lib/test/test_bytes.py
+++ b/Lib/test/test_bytes.py
@@ -73,6 +73,7 @@ class BaseBytesTest(unittest.TestCase):
self.assertEqual(self.type2test('0', 'ascii'), b'0')
self.assertEqual(self.type2test(b'0'), b'0')
+ self.assertRaises(OverflowError, self.type2test, sys.maxsize + 1)
def test_constructor_type_errors(self):
self.assertRaises(TypeError, self.type2test, 0.0)