circuitpython/tests/misc/recursive_data.py

15 lines
288 B
Python
Raw Normal View History

# This tests that printing recursive data structure doesn't lead to segfault.
2017-03-10 19:16:26 -05:00
try:
import uio as io
except ImportError:
import sys
print("SKIP")
sys.exit()
l = [1, 2, 3, None]
l[-1] = l
try:
print(l, file=io.StringIO())
except RuntimeError:
print("RuntimeError")