]> granicus.if.org Git - python/commitdiff
asyncio: Oops, restore a removed test
authorVictor Stinner <victor.stinner@gmail.com>
Fri, 27 Jun 2014 10:23:41 +0000 (12:23 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Fri, 27 Jun 2014 10:23:41 +0000 (12:23 +0200)
Lib/test/test_asyncio/test_tasks.py

index b19d7ccc672a2b223bf0a9959a4da2ebc9a8ba25..8fd3e28f1c6a6f731e5aff6916fc506cc4038406 100644 (file)
@@ -1529,6 +1529,9 @@ class TaskTests(test_utils.TestCase):
     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')