Commit 914d75d
committed
Flush the stdio subprocess's coverage data before the clean-exit line
The stdio interaction test's child only persisted its coverage data in
coverage's atexit hook. On a slow Windows runner the interpreter
teardown plus sqlite save can overrun the transport's termination
grace, and the Job Object kill then silently destroys (or tears) the
data file: every test passes but the 100% gate trips on
_stdio_server.py's subprocess-only lines.
Save the data explicitly before printing the clean-exit line instead.
The test already synchronizes on that line, so once it has been
observed the data is durably on disk and a late kill is harmless. A
kill before the print now fails the stderr assertion loudly instead of
tripping the coverage gate. The trailing lines are excluded (lax no
cover): nothing measured can execute after the flush by construction.1 parent 7267818 commit 914d75d
2 files changed
Lines changed: 27 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
57 | 75 | | |
58 | | - | |
59 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
60 | 79 | | |
61 | 80 | | |
62 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| |||
0 commit comments