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

Function test_iskey

dask/tests/test_core.py:49–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47
48
49def test_iskey():
50 class C:
51 pass
52
53 assert iskey("x")
54 assert iskey(1)
55 assert not iskey(C()) # Custom hashables can't be dask keys
56 assert not iskey((C(),))
57 assert iskey((1, 2))
58 assert iskey(())
59 assert iskey(("x",))
60 assert not iskey([1, 2])
61 assert not iskey({1, 2})
62 assert not iskey({1: 2})
63
64
65def test_iskey_numpy_types():

Callers

nothing calls this directly

Calls 2

iskeyFunction · 0.90
CClass · 0.70

Tested by

no test coverage detected