summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_generators.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_generators.py')
-rw-r--r--Lib/test/test_generators.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
index 53d579e..d14c757 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
@@ -1966,6 +1966,8 @@ True
"""
coroutine_tests = """\
+>>> from test.support import gc_collect
+
Sending a value into a started generator:
>>> def f():
@@ -2189,7 +2191,7 @@ And finalization:
>>> g = f()
>>> next(g)
->>> del g
+>>> del g; gc_collect() # For PyPy or other GCs.
exiting
@@ -2204,7 +2206,7 @@ GeneratorExit is not caught by except Exception:
>>> g = f()
>>> next(g)
->>> del g
+>>> del g; gc_collect() # For PyPy or other GCs.
finally