Skip to content

Commit 7bb4cd5

Browse files
Update run-weakref.test
1 parent 9d7d34a commit 7bb4cd5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

mypyc/test-data/run-weakref.test

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@
44
import pytest # type: ignore [import-not-found]
55
from weakref import ref
66

7+
class MyClass:
8+
pass
9+
710
def test_weakref_ref():
8-
obj = object()
11+
obj = MyClass()
912
r = ref(obj)
1013
assert r() is obj
1114
del obj
1215
assert r() is None
1316

1417
def test_weakref_ref_with_callback():
15-
obj = object()
18+
obj = MyClass()
1619
r = ref(obj, lambda x: x)
1720
assert r() is obj
1821
del obj
@@ -22,7 +25,7 @@ def test_weakref_ref_with_callback():
2225
import pytest # type: ignore [import-not-found]
2326
from weakref import proxy
2427

25-
class MyClass():
28+
class MyClass:
2629
def do_thing(self):
2730
return True
2831

0 commit comments

Comments
 (0)