Skip to content

Commit c55bfc2

Browse files
Jammy2211claude
authored andcommitted
fix: delete dead PYAUTOFIT_TEST_MODE fixture in aggregator conftest (#95)
The autouse `set_test_mode` fixture set `PYAUTOFIT_TEST_MODE`, which nothing reads — the canonical knob is `PYAUTO_TEST_MODE` (autonerves/test_mode.py). The fixture has therefore always been a silent no-op. Renaming it to the live variable is NOT the right fix: it makes test mode actually take effect, which bypasses sampling so the aggregator has no samples to iterate, and 6 of the 13 aggregator tests fail. These tests were written against — and only pass under — normal sampling. Verified three ways: dead var present (baseline) -> 13 passed renamed to PYAUTO_TEST_MODE -> 6 failed, 7 passed fixture deleted (this fix) -> 13 passed So the fixture is deleted rather than renamed: behaviour-preserving, and it removes a trap that autocti_workspace_test/AGENTS.md and autocti_assistant had resorted to documenting instead of deleting. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JiU4VbBD9X6jPYJMCx3boh
1 parent 9b9f5fe commit c55bfc2

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

test_autocti/aggregator/conftest.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@
1010
from autofit.non_linear.samples import Sample
1111

1212

13-
@pytest.fixture(autouse=True)
14-
def set_test_mode():
15-
os.environ["PYAUTOFIT_TEST_MODE"] = "1"
16-
yield
17-
del os.environ["PYAUTOFIT_TEST_MODE"]
18-
19-
2013
def clean(database_file):
2114
database_sqlite = path.join(conf.instance.output_path, f"{database_file}.sqlite")
2215

0 commit comments

Comments
 (0)