Skip to content

Commit 442ce75

Browse files
Create irbuild-weakref.test
1 parent 80ffcbf commit 442ce75

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[case testWeakrefRef]
2+
from weakref import ref
3+
def f(x: object) -> object:
4+
return proxy(x, None)
5+
6+
[out]
7+
def f(x):
8+
x :: object
9+
r0 :: object
10+
L0:
11+
r0 = PyWeakref_NewRef(x, 0)
12+
return r0
13+
14+
[case testWeakrefProxy]
15+
from weakref import proxy
16+
def f(x: object) -> object:
17+
return proxy(x, None)
18+
19+
[out]
20+
def f(x):
21+
x :: object
22+
r0 :: object
23+
L0:
24+
r0 = PyWeakref_NewProxy(x, 0)
25+
return r0

0 commit comments

Comments
 (0)