From c55bfc2180e2c4405362c1a49fb3eab121920bb0 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 22 Jul 2026 18:19:39 +0100 Subject: [PATCH] fix: delete dead PYAUTOFIT_TEST_MODE fixture in aggregator conftest (#95) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_01JiU4VbBD9X6jPYJMCx3boh --- test_autocti/aggregator/conftest.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/test_autocti/aggregator/conftest.py b/test_autocti/aggregator/conftest.py index b2818e6c..ce84ad11 100644 --- a/test_autocti/aggregator/conftest.py +++ b/test_autocti/aggregator/conftest.py @@ -10,13 +10,6 @@ from autofit.non_linear.samples import Sample -@pytest.fixture(autouse=True) -def set_test_mode(): - os.environ["PYAUTOFIT_TEST_MODE"] = "1" - yield - del os.environ["PYAUTOFIT_TEST_MODE"] - - def clean(database_file): database_sqlite = path.join(conf.instance.output_path, f"{database_file}.sqlite")