Discovered during
#9843 review — the reviewer found that in full-suite order, sys.modules['llc.api'] ends up replaced by a non-package module, so every llc.api.* route test errors at setup with ModuleNotFoundError: No module named 'llc.api.backlog'; 'llc.api' is not a package.
Impact
Likely cause
An earlier test's importlib.util.spec_from_file_location + direct sys.modules insertion — pattern at llc/tests/test_routine.py:268-281 — clobbers the package entry.
Fix direction
Restore sys.modules in a fixture/finally around the isolated-load pattern (save+restore the affected keys), or load under a synthetic module name that doesn't collide with the real package path.
Related: #9843 (PR #9994), umbrella #9923.
Discovered during
#9843 review — the reviewer found that in full-suite order,
sys.modules['llc.api']ends up replaced by a non-package module, so everyllc.api.*route test errors at setup withModuleNotFoundError: No module named 'llc.api.backlog'; 'llc.api' is not a package.Impact
llc/testsfull-suite runs (e.g. all ofTestBacklogRoute,test_bulk_assign_sprint_calls_service)Likely cause
An earlier test's
importlib.util.spec_from_file_location+ directsys.modulesinsertion — pattern atllc/tests/test_routine.py:268-281— clobbers the package entry.Fix direction
Restore
sys.modulesin a fixture/finally around the isolated-load pattern (save+restore the affected keys), or load under a synthetic module name that doesn't collide with the real package path.Related: #9843 (PR #9994), umbrella #9923.