Kaydet (Commit) dbfc129c authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Issue #18666: improve test_frame a bit. Patch by Vajrasky Kok.

üst 47cd96ea
...@@ -90,6 +90,9 @@ class ClearTest(unittest.TestCase): ...@@ -90,6 +90,9 @@ class ClearTest(unittest.TestCase):
gen = g() gen = g()
f = next(gen) f = next(gen)
self.assertFalse(endly) self.assertFalse(endly)
# Clearing the frame closes the generator
f.clear()
self.assertTrue(endly)
@support.cpython_only @support.cpython_only
def test_clear_refcycles(self): def test_clear_refcycles(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment