(self)
| 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): |