cpython (3.4): asyncio/tests: Fix a ResourceWarning due to unclosed loop
https://hg.python.org/cpython/rev/d450b88db7f5 changeset: 99598:d450b88db7f5 branch: 3.4 parent: 99595:56095b0e7890 user: Yury Selivanov <yselivanov@sprymix.com> date: Wed Dec 16 20:41:11 2015 -0500 summary: asyncio/tests: Fix a ResourceWarning due to unclosed loop files: Lib/test/test_asyncio/test_tasks.py | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py --- a/Lib/test/test_asyncio/test_tasks.py +++ b/Lib/test/test_asyncio/test_tasks.py @@ -2212,6 +2212,10 @@ self.loop = asyncio.new_event_loop() asyncio.set_event_loop(None) + def tearDown(self): + self.loop.close() + self.loop = None + def test_sleep_zero(self): result = 0 -- Repository URL: https://hg.python.org/cpython
participants (1)
-
yury.selivanov