From dbfc129cc8f2a3ea3e6a0b7e6492887212923bc6 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 6 Aug 2013 23:05:23 +0200 Subject: Issue #18666: improve test_frame a bit. Patch by Vajrasky Kok. --- Lib/test/test_frame.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/test/test_frame.py b/Lib/test/test_frame.py index daabba8..f42dad3 100644 --- a/Lib/test/test_frame.py +++ b/Lib/test/test_frame.py @@ -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): -- cgit v0.12