mirror of
https://github.com/python/cpython.git
synced 2025-09-15 21:26:04 +00:00
have a clear error when passing something > sys.maxsize to bytearray
This commit is contained in:
parent
5c4e292c14
commit
821a8ea39f
3 changed files with 15 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue