Skip to content

Commit 4c4f81f

Browse files
dpgeorgejepler
authored andcommitted
tests/basics/int_big_error.py: Use bytearray to test for int overflow.
In Python 3.7 "1 >> (big int)" is now allowed, it no longer raises an OverflowError. So use bytearray to test big-int conversion overflow.
1 parent 8b5fd95 commit 4c4f81f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/basics/int_big_error.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
except TypeError:
1818
print("TypeError")
1919

20-
# overflow because rhs of >> is being converted to machine int
20+
# overflow because arg of bytearray is being converted to machine int
2121
try:
22-
1 >> i
22+
bytearray(i)
2323
except OverflowError:
2424
print('OverflowError')
2525

0 commit comments

Comments
 (0)