def test_not_decorator(self):
        def g(a, b):
            return a - b

        g = lazy_function(g)

        self.assertIsInstance(g(1, 2), thunk)
Exemple #2
0
def test_const(f, val):
    f = strict(lazy_function(f))

    assert isinstance(f(), thunk)
    assert f() == val
Exemple #3
0
def test_not_decorator():
    def g(a, b):
        return a - b

    g = lazy_function(g)
    assert isinstance(g(1, 2), thunk)