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.
crypto-aes
Damien George 4 years ago committed by Jeff Epler
parent 8b5fd95897
commit 4c4f81f8f2
  1. 4
      tests/basics/int_big_error.py

@ -17,9 +17,9 @@ try:
except TypeError:
print("TypeError")
# overflow because rhs of >> is being converted to machine int
# overflow because arg of bytearray is being converted to machine int
try:
1 >> i
bytearray(i)
except OverflowError:
print('OverflowError')

Loading…
Cancel
Save