]> granicus.if.org Git - python/commitdiff
Issue #18666: improve test_frame a bit. Patch by Vajrasky Kok.
authorAntoine Pitrou <solipsis@pitrou.net>
Tue, 6 Aug 2013 21:05:23 +0000 (23:05 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Tue, 6 Aug 2013 21:05:23 +0000 (23:05 +0200)
Lib/test/test_frame.py

index daabba801b18ea502df9248fda356f0c65b261b6..f42dad342c4853f3913f90188db7582de27f5ac3 100644 (file)
@@ -90,6 +90,9 @@ class ClearTest(unittest.TestCase):
         gen = g()
         f = next(gen)
         self.assertFalse(endly)
+        # Clearing the frame closes the generator
+        f.clear()
+        self.assertTrue(endly)
 
     @support.cpython_only
     def test_clear_refcycles(self):