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

Function test_tokenize_callable_class

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

Source from the content-addressed store, hash-verified

762
763
764def test_tokenize_callable_class():
765 class C:
766 def __init__(self, x):
767 self.x = x
768
769 def __call__(self):
770 return self.x
771
772 class D(C):
773 pass
774
775 a, b, c = C(1), C(2), D(1)
776 assert check_tokenize(a) != check_tokenize(b)
777 assert check_tokenize(a) != check_tokenize(c)
778
779
780def 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