micropython/tests/basics/builtin_range_attrs.py
Paul Sokolovsky 83623b2fde tests/basic/[a-f]*: Make skippable.
For small ports which don't have all features enabled.
2017-02-15 00:57:56 +03:00

20 lines
332 B
Python

# test attributes of builtin range type
try:
range(0).start
except AttributeError:
import sys
print("SKIP")
sys.exit()
# attrs
print(range(1, 2, 3).start)
print(range(1, 2, 3).stop)
print(range(1, 2, 3).step)
# bad attr (can't store)
try:
range(4).start = 0
except AttributeError:
print('AttributeError')