def test_bound_method():
class Test:
def __init__(self):
self.n = 0
def inc(self):
self.n += 1
def get(self):
return self.n
obj = Test()
fun = fcache(obj.get)
assert fun() == 0
This code will fail despite the fact that Test is not being persisted on disk. Test is used just to compute the Hash of Test().get