mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 18:18:22 +00:00
race condition and tests
This commit is contained in:
parent
53d9eeafe0
commit
07d51ffc1a
11 changed files with 76 additions and 23 deletions
|
@ -59,6 +59,16 @@ def test_rich_repr() -> None:
|
|||
assert (repr(Foo("hello", bar=3))) == "Foo('hello', 'hello', bar=3, egg=1)"
|
||||
|
||||
|
||||
def test_rich_repr_positional_only() -> None:
|
||||
@rich.repr.auto
|
||||
class PosOnly:
|
||||
def __init__(self, foo, /):
|
||||
self.foo = 1
|
||||
|
||||
p = PosOnly(1)
|
||||
assert repr(p) == "PosOnly(1)"
|
||||
|
||||
|
||||
def test_rich_angular() -> None:
|
||||
assert (repr(Bar("hello"))) == "<Bar 'hello' 'hello' egg=1>"
|
||||
assert (repr(Bar("hello", bar=3))) == "<Bar 'hello' 'hello' bar=3 egg=1>"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue