diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-12-12 00:29:29 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-12-12 00:58:07 +0200 |
commit | f42b3c7599d7777d057178da379b17249e118f0c (patch) | |
tree | bb509e251b5774c633e9f0d0cda8bf1fb361100c | |
parent | 5fba93a26b6f09c20391ec18b281def2bd851650 (diff) | |
download | micropython-f42b3c7599d7777d057178da379b17249e118f0c.tar.gz micropython-f42b3c7599d7777d057178da379b17249e118f0c.zip |
tests: Activate recursive_data.py test, now that io.StringIO is available.
-rw-r--r-- | tests/misc/recursive_data.py | 9 | ||||
-rw-r--r-- | tests/misc/recursive_data.py.exp | 1 | ||||
-rw-r--r-- | tests/misc/recursive_data.py_ | 9 |
3 files changed, 10 insertions, 9 deletions
diff --git a/tests/misc/recursive_data.py b/tests/misc/recursive_data.py new file mode 100644 index 0000000000..53fb30f9ff --- /dev/null +++ b/tests/misc/recursive_data.py @@ -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") diff --git a/tests/misc/recursive_data.py.exp b/tests/misc/recursive_data.py.exp new file mode 100644 index 0000000000..8a2b9bfdda --- /dev/null +++ b/tests/misc/recursive_data.py.exp @@ -0,0 +1 @@ +RuntimeError diff --git a/tests/misc/recursive_data.py_ b/tests/misc/recursive_data.py_ deleted file mode 100644 index 6a52a3c0e8..0000000000 --- a/tests/misc/recursive_data.py_ +++ /dev/null @@ -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") |