circuitpython/tests/basics/bytearray_intbig.py
Scott Shawcroft fab634e3ee Turn on Rosie CI testing to test new builds on real hardware.
This introduces a skip_if module that can be used by tests to
determine when they should be skipped due to the environment.

Some tests have been split in order to have finer grained skip
control.
2017-08-11 17:16:13 -07:00

13 lines
284 B
Python

# Skip if long ints are not supported.
try:
# We have to use variables because 1 << 40 causes an exception on parse and
# cannot be caught.
x = 40
x = 1 << x
except OverflowError:
print("SKIP")
import sys
sys.exit(1)
print(bytearray(2**65 - (2**65 - 1)))