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

Method test_non_str_keys

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

Source from the content-addressed store, hash-verified

1211 convert(str_msg, Dict[Key, str])
1212
1213 def test_non_str_keys(self, dictcls):
1214 convert(dictcls({1.5: 1}), Dict[float, int]) == {1.5: 1}
1215
1216 with pytest.raises(ValidationError):
1217 convert(dictcls({"x": 1}), Dict[Tuple[int, int], int], str_keys=True)
1218
1219 @pytest.mark.skipif(
1220 PY312,

Callers

nothing calls this directly

Calls 1

dictclsFunction · 0.85

Tested by

no test coverage detected