| 96 | |
| 97 | |
| 98 | def test_render(): |
| 99 | console = Console(width=100, file=io.StringIO(), legacy_windows=False) |
| 100 | |
| 101 | foo = Foo("hello") |
| 102 | inspect(foo, console=console, all=True, value=False) |
| 103 | result = console.file.getvalue() |
| 104 | print(repr(result)) |
| 105 | expected = "╭────────────── <class 'tests.test_inspect.Foo'> ──────────────╮\n│ Foo test │\n│ │\n│ broken = InspectError() │\n│ __init__ = def __init__(foo: int) -> None: constructor docs. │\n│ method = def method(a, b) -> str: Multi line │\n╰──────────────────────────────────────────────────────────────╯\n" |
| 106 | assert result == expected |
| 107 | |
| 108 | |
| 109 | @skip_pypy3 |