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

Function nested_tokenize_ensure_deterministic

dask/tests/test_tokenize.py:384–397  ·  view source on GitHub ↗

Test that the ensure_deterministic override is not lost if tokenize() is called recursively

()

Source from the content-addressed store, hash-verified

382
383
384def nested_tokenize_ensure_deterministic():
385 """Test that the ensure_deterministic override is not lost if tokenize() is
386 called recursively
387 """
388
389 class C:
390 def __dask_tokenize__(self):
391 return tokenize(object())
392
393 assert tokenize(C(), ensure_deterministic=False) != tokenize(
394 C(), ensure_deterministic=False
395 )
396 with pytest.raises(TokenizationError):
397 tokenize(C())
398
399
400_GLOBAL = 1

Callers

nothing calls this directly

Calls 2

tokenizeFunction · 0.90
CClass · 0.70

Tested by

no test coverage detected