circuitpython/tests/stress/recursive_data.py
2023-08-22 12:57:47 -04:00

14 lines
272 B
Python

# This tests that printing recursive data structure doesn't lead to segfault.
try:
import io
except ImportError:
print("SKIP")
raise SystemExit
l = [1, 2, 3, None]
l[-1] = l
try:
print(l, file=io.StringIO())
except RuntimeError:
print("RuntimeError")