diff options
| author | Damien George <damien.p.george@gmail.com> | 2018-04-10 14:42:42 +1000 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2018-04-10 14:43:52 +1000 |
| commit | 5ad27d4b8bb248954d98178e068a382599dadfa6 (patch) | |
| tree | 0b9827eefb7d588728fb57325d87cd0bb896357d /tests/misc | |
| parent | 605fdcf754c2c3f80f71e2dc83dcb3a4e74e5d95 (diff) | |
tests: Move recursive tests to the tests/stress/ subdir.
Keeping all the stress related tests in one place makes it easier to
stress-test a given port, and to also not run such tests on ports that
can't handle them.
Diffstat (limited to 'tests/misc')
| -rw-r--r-- | tests/misc/recursion.py | 7 | ||||
| -rw-r--r-- | tests/misc/recursive_data.py | 13 | ||||
| -rw-r--r-- | tests/misc/recursive_data.py.exp | 1 | ||||
| -rw-r--r-- | tests/misc/recursive_iternext.py | 57 | ||||
| -rw-r--r-- | tests/misc/recursive_iternext.py.exp | 4 |
5 files changed, 0 insertions, 82 deletions
diff --git a/tests/misc/recursion.py b/tests/misc/recursion.py deleted file mode 100644 index 227f48396..000000000 --- a/tests/misc/recursion.py +++ /dev/null @@ -1,7 +0,0 @@ -def foo(): - foo() - -try: - foo() -except RuntimeError: - print("RuntimeError") diff --git a/tests/misc/recursive_data.py b/tests/misc/recursive_data.py deleted file mode 100644 index 3b7fa5095..000000000 --- a/tests/misc/recursive_data.py +++ /dev/null @@ -1,13 +0,0 @@ -# This tests that printing recursive data structure doesn't lead to segfault. -try: - import uio as io -except ImportError: - print("SKIP") - raise SystemExit - -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 deleted file mode 100644 index 8a2b9bfdd..000000000 --- a/tests/misc/recursive_data.py.exp +++ /dev/null @@ -1 +0,0 @@ -RuntimeError diff --git a/tests/misc/recursive_iternext.py b/tests/misc/recursive_iternext.py deleted file mode 100644 index edb5a843f..000000000 --- a/tests/misc/recursive_iternext.py +++ /dev/null @@ -1,57 +0,0 @@ -# This tests that recursion with iternext doesn't lead to segfault. -try: - enumerate - filter - map - max - zip -except: - print("SKIP") - raise SystemExit - -# We need to pick an N that is large enough to hit the recursion -# limit, but not too large that we run out of heap memory. -try: - # large stack/heap, eg unix - [0] * 80000 - N = 2400 -except: - try: - # medium, eg pyboard - [0] * 10000 - N = 1000 - except: - # small, eg esp8266 - N = 100 - -try: - x = (1, 2) - for i in range(N): - x = enumerate(x) - tuple(x) -except RuntimeError: - print("RuntimeError") - -try: - x = (1, 2) - for i in range(N): - x = filter(None, x) - tuple(x) -except RuntimeError: - print("RuntimeError") - -try: - x = (1, 2) - for i in range(N): - x = map(max, x, ()) - tuple(x) -except RuntimeError: - print("RuntimeError") - -try: - x = (1, 2) - for i in range(N): - x = zip(x) - tuple(x) -except RuntimeError: - print("RuntimeError") diff --git a/tests/misc/recursive_iternext.py.exp b/tests/misc/recursive_iternext.py.exp deleted file mode 100644 index 80d1488a3..000000000 --- a/tests/misc/recursive_iternext.py.exp +++ /dev/null @@ -1,4 +0,0 @@ -RuntimeError -RuntimeError -RuntimeError -RuntimeError |
