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

Method test_repr_recursive

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

Source from the content-addressed store, hash-verified

763 assert x.__rich_repr__() == [("a", 0), ("b", 1), ("c", "two")]
764
765 def test_repr_recursive(self):
766 class Test(Struct):
767 a: int
768 b: Any
769
770 t = Test(1, Test(2, None))
771 t.b.b = t
772 assert repr(t) == "Test(a=1, b=Test(a=2, b=...))"
773
774 def test_repr_missing_attr_errors(self):
775 class Test(Struct):

Callers

nothing calls this directly

Calls 1

TestClass · 0.70

Tested by

no test coverage detected