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

Function test_tokenize_callable_class

dask/tests/test_tokenize.py:763–776  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

761
762
763def test_tokenize_callable_class():
764 class C:
765 def __init__(self, x):
766 self.x = x
767
768 def __call__(self):
769 return self.x
770
771 class D(C):
772 pass
773
774 a, b, c = C(1), C(2), D(1)
775 assert check_tokenize(a) != check_tokenize(b)
776 assert check_tokenize(a) != check_tokenize(c)
777
778
779def test_tokenize_callable_class_with_tokenize_method():

Callers

nothing calls this directly

Calls 3

DClass · 0.85
check_tokenizeFunction · 0.85
CClass · 0.70

Tested by

no test coverage detected