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

Method test_nested_badkey

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

Source from the content-addressed store, hash-verified

77 assert False, msg.format(self.get.__name__)
78
79 def test_nested_badkey(self):
80 d = {"x": 1, "y": 2, "z": (sum, ["x", "y"])}
81
82 try:
83 result = self.get(d, [["badkey"], "y"])
84 except KeyError:
85 pass
86 else:
87 msg = "Expected `{}` with badkey to raise KeyError.\n"
88 msg += f"Obtained '{result}' instead."
89 assert False, msg.format(self.get.__name__)
90
91 def test_data_not_in_dict_is_ok(self):
92 d = {"x": 1, "y": (add, "x", 10)}

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected