aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_asyncio/test_streams.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_asyncio/test_streams.py')
-rw-r--r--Lib/test/test_asyncio/test_streams.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py
index 0688299447d..dbe5646c2b7 100644
--- a/Lib/test/test_asyncio/test_streams.py
+++ b/Lib/test/test_asyncio/test_streams.py
@@ -1214,9 +1214,9 @@ class StreamTests(test_utils.TestCase):
# can't use assertRaises because that clears frames
exc = excs.exceptions[0]
self.assertIsNotNone(exc)
- self.assertListEqual(gc.get_referrers(exc), [])
-
- asyncio.run(main())
+ self.assertListEqual(gc.get_referrers(exc), [main_coro])
+ main_coro = main()
+ asyncio.run(main_coro)
if __name__ == '__main__':