We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ced645a commit eac660aCopy full SHA for eac660a
tests/test_base.py
@@ -2,9 +2,9 @@
2
import logging
3
import threading
4
import time
5
-
6
import uvloop
7
import unittest
+import weakref
8
9
from unittest import mock
10
from uvloop._testbase import UVTestCase, AIOTestCase
@@ -28,6 +28,11 @@ def test_close(self):
28
self.assertRaises(RuntimeError, self.loop.run_forever)
29
self.assertRaises(RuntimeError, self.loop.run_until_complete, f)
30
31
+ def test_handle_weakref(self):
32
+ wd = weakref.WeakValueDictionary()
33
+ h = self.loop.call_soon(lambda: None)
34
+ wd['h'] = h # Would fail without __weakref__ slot.
35
+
36
def test_call_soon(self):
37
calls = []
38
0 commit comments