asyncio/tests: Ensure a gc_collect for __del__ testing

Patch by Philip Jenvey
This commit is contained in:
Yury Selivanov 2016-05-13 16:10:43 -04:00
parent 5dc093336f
commit f11352c114
2 changed files with 2 additions and 0 deletions

View file

@ -628,6 +628,7 @@ class BaseEventLoopTests(test_utils.TestCase):
fut.add_done_callback(lambda *args: self.loop.stop())
self.loop.run_forever()
fut = None # Trigger Future.__del__ or futures._TracebackLogger
support.gc_collect()
if PY34:
# Future.__del__ in Python 3.4 logs error with
# an actual exception context