MCPcopy
hub / github.com/dask/dask / test_nested_badkey

Method test_nested_badkey

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

Source from the content-addressed store, hash-verified

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"])}
66
67 try:
68 result = self.get(d, [["badkey"], "y"])
69 except KeyError:
70 pass
71 else:
72 msg = "Expected `{}` with badkey to raise KeyError.\n"
73 msg += f"Obtained '{result}' instead."
74 assert False, msg.format(self.get.__name__)
75
76 def test_data_not_in_dict_is_ok(self):
77 d = {"x": 1, "y": (add, "x", 10)}

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected