diff --git a/tests/test_pretty.py b/tests/test_pretty.py index 3e6c5a3c6..32d3ffb59 100644 --- a/tests/test_pretty.py +++ b/tests/test_pretty.py @@ -550,16 +550,19 @@ def test_tuple_rich_repr(): """ Test that can use None as key to have tuple positional values. """ + class Foo: def __rich_repr__(self): yield None, (1,) assert pretty_repr(Foo()) == "Foo((1,))" + def test_tuple_rich_repr_default(): """ Test that can use None as key to have tuple positional values and with a default. """ + class Foo: def __rich_repr__(self): yield None, (1,), (1,)