(self)
| 712 | assert x.__rich_repr__() == [("a", 1)] |
| 713 | |
| 714 | def test_repr_two_fields(self): |
| 715 | class Test(Struct): |
| 716 | a: int |
| 717 | b: str |
| 718 | |
| 719 | x = Test(1, "y") |
| 720 | assert repr(x) == "Test(a=1, b='y')" |
| 721 | assert x.__rich_repr__() == [("a", 1), ("b", "y")] |
| 722 | |
| 723 | def test_repr_omit_defaults_empty(self): |
| 724 | class Test(Struct, repr_omit_defaults=True): |