mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
asyncio/tests: Fix a ResourceWarning due to unclosed loop
This commit is contained in:
parent
3cd863c86e
commit
ea4ce1c776
1 changed files with 4 additions and 0 deletions
|
|
@ -2212,6 +2212,10 @@ class SleepTests(test_utils.TestCase):
|
||||||
self.loop = asyncio.new_event_loop()
|
self.loop = asyncio.new_event_loop()
|
||||||
asyncio.set_event_loop(None)
|
asyncio.set_event_loop(None)
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
self.loop.close()
|
||||||
|
self.loop = None
|
||||||
|
|
||||||
def test_sleep_zero(self):
|
def test_sleep_zero(self):
|
||||||
result = 0
|
result = 0
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue