2014-12-11 17:29:29 -05:00
|
|
|
# This tests that printing recursive data structure doesn't lead to segfault.
|
2017-03-10 19:16:26 -05:00
|
|
|
try:
|
2022-08-18 02:57:45 -04:00
|
|
|
import io
|
2017-03-10 19:16:26 -05:00
|
|
|
except ImportError:
|
|
|
|
print("SKIP")
|
2017-06-10 13:14:16 -04:00
|
|
|
raise SystemExit
|
2014-12-11 17:29:29 -05:00
|
|
|
|
|
|
|
l = [1, 2, 3, None]
|
|
|
|
l[-1] = l
|
|
|
|
try:
|
|
|
|
print(l, file=io.StringIO())
|
|
|
|
except RuntimeError:
|
|
|
|
print("RuntimeError")
|