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 3333new_proxy_with_callback_op = function_op (
3434 name = "_weakref.proxy" ,
3535 arg_types = [object_rprimitive , object_rprimitive ],
36- steals = [True , False ],
36+ # steals=[True, False],
3737 return_type = object_rprimitive ,
3838 c_function_name = "PyWeakref_NewProxy" ,
3939 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():
5858 p = proxy(obj)
5959 assert obj.some_meth() == 1
6060 assert p.some_meth() == 1
61+ obj.some_meth()
6162 obj = None
6263 with pytest.raises(ReferenceError):
6364 p.some_meth()
6465
66+ [builtins fixtures/test-weakref.pyi]
6567[file driver.py]
6668from native import test_weakref_proxy
6769
@@ -84,10 +86,12 @@ def test_weakref_proxy_with_callback():
8486 p = proxy(obj, lambda x: x)
8587 assert obj.some_meth() == 1
8688 assert p.some_meth() == 1
89+ obj.some_meth()
8790 obj = None
8891 with pytest.raises(ReferenceError):
8992 p.some_meth()
9093
94+ [builtins fixtures/test-weakref.pyi]
9195[file driver.py]
9296from native import test_weakref_proxy_with_callback
9397
You can’t perform that action at this time.
0 commit comments