Files
DeepTutor/tests/api
Bingxi Zhao (Frank) cc316f03dd test: stop letting one test decide what the next one resolves
Five kinds of global state leaked between tests, so the suite passed in
collection order and failed in any other. The worst is the LLM config
cache: `get_llm_config` memoises into a module-level `_LLM_CONFIG_CACHE`,
so whichever test resolved first decided what every later test saw, and
anything built off that config at init time — `QuestionPipeline` among
them — passed only because an earlier test had already filled it.

Resolve every test against the same fake and clear the cache on both
sides, with a `real_llm_resolver` marker for the tests that are checking
resolution itself. The rest are the same shape: patches that were never
torn down, a container singleton that outlived its test, and a launcher
writing `os.environ` where a subprocess inherited it.

Run in reverse, the suite went from 42 failed to 0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 13:54:31 +08:00
..
2026-06-11 20:03:34 +08:00
2026-09-02 04:09:11 +08:00
2026-08-30 12:10:26 -04:00
2026-06-17 10:50:44 +08:00
2026-09-02 04:09:11 +08:00
2026-09-02 04:09:11 +08:00
2026-09-02 04:09:11 +08:00
2026-06-21 14:43:41 +08:00
2026-09-06 13:46:29 +08:00
2026-08-02 13:07:32 +08:00
2026-09-06 13:46:29 +08:00