MCPcopy
hub / github.com/Textualize/rich / test_rich_repr_positional_only

Function test_rich_repr_positional_only

tests/test_repr.py:97–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95
96
97def test_rich_repr_positional_only() -> None:
98 _locals = locals().copy()
99 exec(
100 """\
101@rich.repr.auto
102class PosOnly:
103 def __init__(self, foo, /):
104 self.foo = 1
105 """,
106 globals(),
107 _locals,
108 )
109 p = _locals["PosOnly"](1)
110 assert repr(p) == "PosOnly(1)"
111
112
113def test_rich_angular() -> None:

Callers

nothing calls this directly

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected