Commit ea7267d
committed
fix(test): deregister needs_update bars from global capture registry
test_needs_update starts bars (registering them as global capture
listeners via streams.start_capturing) but never finish()es them, and
one deliberately sets term_width='wide' to prove the width-threshold
math now propagates. That poisoned bar lingered in streams.listeners,
so when a *later* test wrote a newline to the captured stream --
WrappingIO.write calls update() on every listener -- the abandoned bar
hit the int/str division from commit 84b9413 and raised, intermittently
failing test_examples and test_no_newlines (the failure surfaced or hid
depending on freezegun-driven redraw timing).
Add an autouse fixture that deregisters whatever each test started, so
a bar driven into an invalid state can never poison another test.1 parent 43f11d1 commit ea7267d
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
18 | 32 | | |
19 | 33 | | |
20 | 34 | | |
| |||
0 commit comments