()
| 59 | |
| 60 | |
| 61 | def test_render_size() -> None: |
| 62 | console = Console(width=63, height=46, legacy_windows=False) |
| 63 | options = console.options.update_dimensions(80, 4) |
| 64 | lines = console.render_lines(Panel(class="st">"foo", title=class="st">"Hello"), options=options) |
| 65 | print(repr(lines)) |
| 66 | expected = [ |
| 67 | [ |
| 68 | Segment(class="st">"╭─", Style()), |
| 69 | Segment( |
| 70 | class="st">"────────────────────────────────── Hello ───────────────────────────────────" |
| 71 | ), |
| 72 | Segment(class="st">"─╮", Style()), |
| 73 | ], |
| 74 | [ |
| 75 | Segment(class="st">"│", Style()), |
| 76 | Segment(class="st">" ", Style()), |
| 77 | Segment(class="st">"foo"), |
| 78 | Segment( |
| 79 | class="st">" ", |
| 80 | Style(), |
| 81 | ), |
| 82 | Segment(class="st">" ", Style()), |
| 83 | Segment(class="st">"│", Style()), |
| 84 | ], |
| 85 | [ |
| 86 | Segment(class="st">"│", Style()), |
| 87 | Segment(class="st">" ", Style()), |
| 88 | Segment( |
| 89 | class="st">" ", |
| 90 | Style(), |
| 91 | ), |
| 92 | Segment(class="st">" ", Style()), |
| 93 | Segment(class="st">"│", Style()), |
| 94 | ], |
| 95 | [ |
| 96 | Segment( |
| 97 | class="st">"╰──────────────────────────────────────────────────────────────────────────────╯", |
| 98 | Style(), |
| 99 | ) |
| 100 | ], |
| 101 | ] |
| 102 | assert lines == expected |
| 103 | |
| 104 | |
| 105 | def test_title_text() -> None: |
nothing calls this directly
no test coverage detected