summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-08-17 15:43:47 +1000
committerJeff Epler <jepler@gmail.com>2020-03-31 17:27:10 -0500
commit4c4f81f8f2f68a5dc47d37ba185a2506224d7159 (patch)
tree3f78a90b635f22a66279c4f1089abfda0aca68e4 /tests
parent8b5fd95897b967e5077527f50657ac4ded39a9aa (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')
-rw-r--r--tests/basics/int_big_error.py4
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')