Commit 33a23cf
committed
test: make the suite hermetic against the ambient small-datasets flag
Every FITS the stack writes now carries a SMALLDAT card whose value tracks
PYAUTO_SMALL_DATASETS at write time. Several tests write into TRACKED fixture
paths -- a pre-existing pattern, 14 such files across this repo and
PyAutoNerves -- so the bytes those tests produce had become a function of the
shell: running the suite with PYAUTO_SMALL_DATASETS=1 exported, which
should_simulate's own docstring calls the default for most harness runs, passed
but left the working tree dirty. Verified against fresh main worktrees that this
dirtying is introduced by the stamp and is not pre-existing.
An autouse fixture clearing the var restores the property the stamp took away --
test output is a function of the test, not of the environment -- in one place,
rather than by rewriting every fixture-writing test in a PR about a header card.
Tests that need a regime set it with monkeypatch.setenv in their body, which
runs after the fixture and wins. No test depended on the ambient value.
Verified: 1090 passed and tree clean both with the var exported and unset (the
11 failures are pre-existing missing-pynufft, identical on main).
Found by three independent review lenses, each reproducing it separately.1 parent 449d991 commit 33a23cf
1 file changed
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
0 commit comments