summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-12-17 01:41:11 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-12-17 01:41:11 (GMT)
commitea4ce1c7766e7bc5428c994af0419cdb77e02fe7 (patch)
tree860d5d766c5a4223adf174875520bf680b910d2f /Lib/test/test_asyncio
parent3cd863c86ec69ca6ed96e3f164fec338543784a7 (diff)
downloadcpython-ea4ce1c7766e7bc5428c994af0419cdb77e02fe7.zip
cpython-ea4ce1c7766e7bc5428c994af0419cdb77e02fe7.tar.gz
cpython-ea4ce1c7766e7bc5428c994af0419cdb77e02fe7.tar.bz2
asyncio/tests: Fix a ResourceWarning due to unclosed loop
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r--Lib/test/test_asyncio/test_tasks.py4
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
index 47b17d1..5ee20f6 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -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