()
| 295 | |
| 296 | |
| 297 | def test_set_length(): |
| 298 | text = Text(class="st">"Hello") |
| 299 | text.set_length(5) |
| 300 | assert text == Text(class="st">"Hello") |
| 301 | |
| 302 | text = Text(class="st">"Hello") |
| 303 | text.set_length(10) |
| 304 | assert text == Text(class="st">"Hello ") |
| 305 | |
| 306 | text = Text(class="st">"Hello World") |
| 307 | text.stylize(class="st">"bold", 0, 5) |
| 308 | text.stylize(class="st">"italic", 7, 9) |
| 309 | |
| 310 | text.set_length(3) |
| 311 | expected = Text() |
| 312 | expected.append(class="st">"Hel", class="st">"bold") |
| 313 | assert text == expected |
| 314 | |
| 315 | |
| 316 | def test_console_width(): |
nothing calls this directly
no test coverage detected