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

Method test_defstruct_bases_none

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

Source from the content-addressed store, hash-verified

2171 assert as_tuple(Point(1, 2, 3)) == (1, 2, 3)
2172
2173 def test_defstruct_bases_none(self):
2174 Point = defstruct("Point", ["x", "y"], bases=None)
2175 assert Point.mro() == [Point, *Struct.mro()]
2176 assert Point(1, 2) == Point(1, 2)
2177
2178 def test_defstruct_module(self):
2179 Test = defstruct("Test", [], module="testmod")

Callers

nothing calls this directly

Calls 1

PointClass · 0.70

Tested by

no test coverage detected