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

Method test_astuple

tests/unit/test_struct.py:2402–2404  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2400 assert msgspec.structs.asdict(x) == {"x": 1, "y": 2}
2401
2402 def test_astuple(self):
2403 x = Point(1, 2)
2404 assert msgspec.structs.astuple(x) == (1, 2)
2405
2406 @pytest.mark.parametrize("func", [msgspec.structs.asdict, msgspec.structs.astuple])
2407 def test_errors(self, func):

Callers

nothing calls this directly

Calls 1

PointClass · 0.70

Tested by

no test coverage detected