MCPcopy Create free account
hub / github.com/dask/dask / test_callable_obj

Function test_callable_obj

dask/tests/test_delayed.py:687–699  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

685
686
687def test_callable_obj():
688 class Foo:
689 def __init__(self, a):
690 self.a = a
691
692 def __call__(self):
693 return 2
694
695 foo = Foo(1)
696 f = delayed(foo)
697 assert f.compute() is foo
698 assert f.a.compute() == 1
699 assert f().compute() == 2
700
701
702def identity(x):

Callers

nothing calls this directly

Calls 4

delayedFunction · 0.90
FooClass · 0.70
fFunction · 0.70
computeMethod · 0.45

Tested by

no test coverage detected