You've already forked Core2forAWS-MicroPython
mirror of
https://github.com/m5stack/Core2forAWS-MicroPython.git
synced 2026-05-20 10:30:31 -07:00
tests: Activate recursive_data.py test, now that io.StringIO is available.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# This tests that printing recursive data structure doesn't lead to segfault.
|
||||
import _io as io
|
||||
|
||||
l = [1, 2, 3, None]
|
||||
l[-1] = l
|
||||
try:
|
||||
print(l, file=io.StringIO())
|
||||
except RuntimeError:
|
||||
print("RuntimeError")
|
||||
@@ -0,0 +1 @@
|
||||
RuntimeError
|
||||
@@ -1,9 +0,0 @@
|
||||
# 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")
|
||||
Reference in New Issue
Block a user