Skip to content
Snippets Groups Projects
Commit 0988b14c authored by Damien George's avatar Damien George
Browse files

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.
parent 96e1fd48
Branches
No related tags found
No related merge requests found
...@@ -17,9 +17,9 @@ try: ...@@ -17,9 +17,9 @@ try:
except TypeError: except TypeError:
print("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: try:
1 >> i bytearray(i)
except OverflowError: except OverflowError:
print('OverflowError') print('OverflowError')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment