MCPcopy Index your code
hub / github.com/dask/dask / test_badkey

Method test_badkey

dask/utils_test.py:53–62  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

51 assert self.get(d, ":z") == 3
52
53 def test_badkey(self):
54 d = {":x": 1, ":y": (inc, ":x"), ":z": (add, ":x", ":y")}
55 try:
56 result = self.get(d, "badkey")
57 except KeyError:
58 pass
59 else:
60 msg = "Expected `{}` with badkey to raise KeyError.\n"
61 msg += f"Obtained '{result}' instead."
62 assert False, msg.format(self.get.__name__)
63
64 def test_nested_badkey(self):
65 d = {"x": 1, "y": 2, "z": (sum, ["x", "y"])}

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected