circuitpython/tests/stress/recursive_data.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
272 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:
2023-08-22 11:15:46 -04:00
import io
2017-03-10 19:16:26 -05:00
except ImportError:
print("SKIP")
raise SystemExit
l = [1, 2, 3, None]
l[-1] = l
try:
print(l, file=io.StringIO())
except RuntimeError:
print("RuntimeError")