MCPcopy Index your code
hub / github.com/msgspec/msgspec / test_empty_dict

Method test_empty_dict

tests/unit/test_convert.py:1157–1159  ·  view source on GitHub ↗
(self, dictcls)

Source from the content-addressed store, hash-verified

1155 assert convert(dictcls({"one": 1, 2: "two"}), Any) == {"one": 1, 2: "two"}
1156
1157 def test_empty_dict(self, dictcls):
1158 assert convert(dictcls({}), dict) == {}
1159 assert convert(dictcls({}), Dict[int, int]) == {}
1160
1161 def test_typed_dict(self, dictcls):
1162 res = convert(dictcls({"x": 1, "y": 2}), Dict[str, float])

Callers

nothing calls this directly

Calls 1

dictclsFunction · 0.85

Tested by

no test coverage detected