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

Function assert_no_hashes

dask/tests/test_tokenize.py:1528–1538  ·  view source on GitHub ↗
(tokens)

Source from the content-addressed store, hash-verified

1526 assert check_tokenize(d) != check_tokenize(e)
1527
1528 def assert_no_hashes(tokens):
1529 if isinstance(tokens, (list, tuple)):
1530 for token in tokens:
1531 assert_no_hashes(token)
1532 elif isinstance(tokens, dict):
1533 for key, value in tokens.items():
1534 assert_no_hashes(key)
1535 assert_no_hashes(value)
1536 elif isinstance(tokens, str):
1537 with pytest.raises(ValueError):
1538 bytes.fromhex(tokens)
1539
1540 # Test that the RangeIndex is not unrolled into a
1541 # potentially huge arange buffer

Callers 1

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected