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

Function nested_tokenize_ensure_deterministic

dask/tests/test_tokenize.py:383–396  ·  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

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

Callers

nothing calls this directly

Calls 2

tokenizeFunction · 0.90
CClass · 0.70

Tested by

no test coverage detected