summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run-tests1
-rw-r--r--tests/stress/recursive_gen.py9
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/run-tests b/tests/run-tests
index ef2f4bc6a..42037831d 100755
--- a/tests/run-tests
+++ b/tests/run-tests
@@ -367,6 +367,7 @@ def run_tests(pyb, tests, args, base_path="."):
skip_tests.add('micropython/heapalloc_iter.py') # requires generators
skip_tests.add('micropython/schedule.py') # native code doesn't check pending events
skip_tests.add('stress/gc_trace.py') # requires yield
+ skip_tests.add('stress/recursive_gen.py') # requires yield
for test_file in tests:
test_file = test_file.replace('\\', '/')
diff --git a/tests/stress/recursive_gen.py b/tests/stress/recursive_gen.py
new file mode 100644
index 000000000..65f5d8d47
--- /dev/null
+++ b/tests/stress/recursive_gen.py
@@ -0,0 +1,9 @@
+# test deeply recursive generators
+
+def gen():
+ yield from gen()
+
+try:
+ list(gen())
+except RuntimeError:
+ print('RuntimeError')