From dbfc129cc8f2a3ea3e6a0b7e6492887212923bc6 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 6 Aug 2013 23:05:23 +0200 Subject: [PATCH] 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 daabba801b18..f42dad342c48 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): -- 2.47.3