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

Function assert_no_hashes

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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected