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

Method test_repr_one_field

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

Source from the content-addressed store, hash-verified

704 assert x.__rich_repr__() == []
705
706 def test_repr_one_field(self):
707 class Test(Struct):
708 a: int
709
710 x = Test(1)
711 assert repr(x) == "Test(a=1)"
712 assert x.__rich_repr__() == [("a", 1)]
713
714 def test_repr_two_fields(self):
715 class Test(Struct):

Callers

nothing calls this directly

Calls 1

TestClass · 0.70

Tested by

no test coverage detected