diff options
author | Damien George <damien.p.george@gmail.com> | 2018-08-17 15:43:47 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-08-17 15:43:47 +1000 |
commit | 0988b14cd6d5fdbcc3fe3e65c6bdb6af1e906597 (patch) | |
tree | c376413001212f38e71d1b2e922ebd95fcdae08d /tests/basics/int_big_error.py | |
parent | 96e1fd480d6bc31b8c2954b20477cac262d1f1e5 (diff) |
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.
Diffstat (limited to 'tests/basics/int_big_error.py')
-rw-r--r-- | tests/basics/int_big_error.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/basics/int_big_error.py b/tests/basics/int_big_error.py index e036525d1..79809aef1 100644 --- a/tests/basics/int_big_error.py +++ b/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') |