Commit 43f9258
committed
🐛 FIX: Make CLI error assertions resilient to terminal width Typer wraps error messages in Rich panels whose line breaks depend on terminal width. In CI environments with narrow terminals, long assertion substrings get split across lines by box-drawing characters, causing test_analyse_config_negative (and similar) to fail. Add _normalize_output() helper that strips Rich panel formatting and collapses whitespace before substring matching. Applied to test_analyse_config_negative, test_analyse_project_negative, and test_write_rst_negative.
Typer wraps error messages in Rich panels whose line breaks depend
on terminal width. In CI environments with narrow terminals, long
assertion substrings get split across lines by box-drawing characters,
causing test_analyse_config_negative (and similar) to fail.
Add _normalize_output() helper that strips Rich panel formatting
and collapses whitespace before substring matching. Applied to
test_analyse_config_negative, test_analyse_project_negative, and
test_write_rst_negative.1 parent 4f323e6 commit 43f9258
1 file changed
Lines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
49 | 62 | | |
50 | 63 | | |
51 | 64 | | |
| |||
215 | 228 | | |
216 | 229 | | |
217 | 230 | | |
| 231 | + | |
218 | 232 | | |
219 | | - | |
| 233 | + | |
220 | 234 | | |
221 | 235 | | |
222 | 236 | | |
| |||
248 | 262 | | |
249 | 263 | | |
250 | 264 | | |
| 265 | + | |
251 | 266 | | |
252 | | - | |
| 267 | + | |
253 | 268 | | |
254 | 269 | | |
255 | 270 | | |
| |||
318 | 333 | | |
319 | 334 | | |
320 | 335 | | |
| 336 | + | |
321 | 337 | | |
322 | | - | |
| 338 | + | |
323 | 339 | | |
324 | 340 | | |
325 | 341 | | |
| |||
0 commit comments