diff options
Diffstat (limited to 'Lib/test/test_asyncio/test_events.py')
| -rw-r--r-- | Lib/test/test_asyncio/test_events.py | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 1e64dd07d6..03c414914a 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -21,6 +21,7 @@ import time  import errno  import unittest  from unittest import mock +import weakref  from test import support  # find_unused_port, IPV6_ENABLED, TEST_HOME_DIR @@ -1786,6 +1787,11 @@ class HandleTests(unittest.TestCase):              'handle': h          }) +    def test_handle_weakref(self): +        wd = weakref.WeakValueDictionary() +        h = asyncio.Handle(lambda: None, (), object()) +        wd['h'] = h  # Would fail without __weakref__ slot. +  class TimerTests(unittest.TestCase):  | 
