Commit 318491b7 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

Weakfuncref test

parent 5634900f
......@@ -24,6 +24,18 @@ def make_weakfuncref_method_that_will_get_gcd():
return weakfuncref.WeakFunctionRef(Thing.method)
def test_weakfuncref_call():
def func():
non_gcd_func = weakfuncref.WeakFunctionRef(func)
gcd_func = make_weakfuncref_that_will_get_gcd()
assert gcd_func() is None
assert non_gcd_func() is func
def test_weakfuncref_function():
def func():
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment