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

Method test_defstruct_simple

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

Source from the content-addressed store, hash-verified

2116
2117class TestDefStruct:
2118 def test_defstruct_simple(self):
2119 Point = defstruct("Point", ["x", "y"])
2120 assert issubclass(Point, Struct)
2121 assert as_tuple(Point(1, 2)) == (1, 2)
2122 assert Point.__module__ == "tests.unit.test_struct"
2123
2124 def test_defstruct_empty(self):
2125 Empty = defstruct("Empty", [])

Callers

nothing calls this directly

Calls 2

as_tupleFunction · 0.85
PointClass · 0.70

Tested by

no test coverage detected