def test_not_decorator(self): def g(a, b): return a - b g = lazy_function(g) self.assertIsInstance(g(1, 2), thunk)
def test_const(f, val): f = strict(lazy_function(f)) assert isinstance(f(), thunk) assert f() == val
def test_not_decorator(): def g(a, b): return a - b g = lazy_function(g) assert isinstance(g(1, 2), thunk)