Skip to content

Commit 97f9186

Browse files
committed
fix(test): only test with callback
1 parent 8d41c26 commit 97f9186

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

mypyc/test-data/irbuild-weakref.test

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
[case testWeakrefRef]
2-
import weakref
3-
from typing import Any, Callable
4-
def f(x: object) -> object:
5-
return weakref.ref(x)
6-
7-
[out]
8-
def f(x):
9-
x, r0 :: object
10-
L0:
11-
r0 = PyWeakref_NewRef(x, NULL)
12-
return r0
13-
141
[case testWeakrefRefCallback]
152
import weakref
163
from typing import Any, Callable
@@ -24,19 +11,6 @@ L0:
2411
r0 = PyWeakref_NewRef(x, cb)
2512
return r0
2613

27-
[case testFromWeakrefRef]
28-
from typing import Any, Callable
29-
from weakref import ref
30-
def f(x: object) -> object:
31-
return ref(x)
32-
33-
[out]
34-
def f(x):
35-
x, r0 :: object
36-
L0:
37-
r0 = PyWeakref_NewRef(x, NULL)
38-
return r0
39-
4014
[case testFromWeakrefRefCallback]
4115
from typing import Any, Callable
4216
from weakref import ref

mypyc/test-data/run-weakref.test

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ class Object:
1010
"""some random weakreffable object"""
1111
pass
1212

13-
def test_weakref_ref():
14-
obj = Object()
15-
r = ref(obj)
16-
assert r() is obj
17-
obj = None
18-
assert r() is None, r()
19-
2013
def test_weakref_ref_with_callback():
2114
obj = Object()
2215
r = ref(obj, lambda x: x)

0 commit comments

Comments
 (0)