]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
asyncio/tests: Fix a ResourceWarning due to unclosed loop
authorYury Selivanov <yselivanov@sprymix.com>
Thu, 17 Dec 2015 01:41:11 +0000 (20:41 -0500)
committerYury Selivanov <yselivanov@sprymix.com>
Thu, 17 Dec 2015 01:41:11 +0000 (20:41 -0500)
Lib/test/test_asyncio/test_tasks.py

index 47b17d1bcb37f05be7eecfab6c7e9cfd501a43e2..5ee20f6a2979f8de8d7260a283abde2aab0f5bdc 100644 (file)
@@ -2212,6 +2212,10 @@ class SleepTests(test_utils.TestCase):
         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