blob: 6a52a3c0e801f3966917cb1f39038c6155ad9bb9 (
plain)
1
2
3
4
5
6
7
8
9
|
# This tests that printing recursive data structure doesn't lead to segfault.
# Unfortunately, print() so far doesn't support "file "kwarg, so variable-len
# output of this test cannot be redirected, and this test cannot be validated.
l = [1, 2, 3, None]
l[-1] = l
try:
print(l)
except RuntimeError:
print("RuntimeError")
|