diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py index b19d7ccc672a..8fd3e28f1c6a 100644 --- a/Lib/test/test_asyncio/test_tasks.py +++ b/Lib/test/test_asyncio/test_tasks.py @@ -1529,6 +1529,9 @@ def call(arg): def test_corowrapper_weakref(self): wd = weakref.WeakValueDictionary() def foo(): yield from [] + cw = asyncio.tasks.CoroWrapper(foo(), foo) + wd['cw'] = cw # Would fail without __weakref__ slot. + cw.gen = None # Suppress warning from __del__. @unittest.skipUnless(PY34, 'need python 3.4 or later')