File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 33
33
new_proxy_with_callback_op = function_op (
34
34
name = "_weakref.proxy" ,
35
35
arg_types = [object_rprimitive , object_rprimitive ],
36
- steals = [True , False ],
36
+ # steals=[True, False],
37
37
return_type = object_rprimitive ,
38
38
c_function_name = "PyWeakref_NewProxy" ,
39
39
error_kind = ERR_MAGIC ,
Original file line number Diff line number Diff line change
1
+ class dict : ...
2
+ class ellipsis : ...
3
+ class int : ...
4
+ class str : ...
5
+ class tuple : ...
6
+ class type : ...
7
+ class list : ...
8
+ class BaseException : ...
9
+ class Exception (BaseException ): ...
10
+ class ReferenceError (Exception ): ...
Original file line number Diff line number Diff line change @@ -58,10 +58,12 @@ def test_weakref_proxy():
58
58
p = proxy(obj)
59
59
assert obj.some_meth() == 1
60
60
assert p.some_meth() == 1
61
+ obj.some_meth()
61
62
obj = None
62
63
with pytest.raises(ReferenceError):
63
64
p.some_meth()
64
65
66
+ [builtins fixtures/test-weakref.pyi]
65
67
[file driver.py]
66
68
from native import test_weakref_proxy
67
69
@@ -84,10 +86,12 @@ def test_weakref_proxy_with_callback():
84
86
p = proxy(obj, lambda x: x)
85
87
assert obj.some_meth() == 1
86
88
assert p.some_meth() == 1
89
+ obj.some_meth()
87
90
obj = None
88
91
with pytest.raises(ReferenceError):
89
92
p.some_meth()
90
93
94
+ [builtins fixtures/test-weakref.pyi]
91
95
[file driver.py]
92
96
from native import test_weakref_proxy_with_callback
93
97
You can’t perform that action at this time.
0 commit comments