[codex] Isolate sync decode test imports on Windows#7948
Open
tianmind-studio wants to merge 1 commit into
Open
[codex] Isolate sync decode test imports on Windows#7948tianmind-studio wants to merge 1 commit into
tianmind-studio wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
python_multipartstub while importingrouters.syncin the PCM and Opus decode unit tests, so lightweight Windows backend envs can collect the tests without the full multipart package installed.routers.syncimport surface, even when earlier-collected tests left partial modules insys.modules.Root cause
These decode tests exercise pure PCM/Opus WAL conversion helpers, but importing
routers.syncalso builds FastAPI routes and imports optional service helpers. In this Windows lightweight backend venv, standalone collection failed on FastAPI's multipart package check. In collection-order runs after stub-heavy tests, partialopuslib,database.conversations,utils.cloud_tasks, andutils.other.endpointsmodules could block collection before the decode assertions ran.Before this change:
python -m pytest backend\tests\unit\test_sync_pcm_decode.py --collect-only -q --tb=short->RuntimeError: Form data requires "python-multipart" to be installed.python -m pytest backend\tests\unit\test_sync_opus_decode.py --collect-only -q --tb=short->RuntimeError: Form data requires "python-multipart" to be installed.python -m pytest backend\tests\unit\test_action_item_date_validation.py backend\tests\unit\test_sync_pcm_decode.py backend\tests\unit\test_sync_opus_decode.py --collect-only -q --tb=short --continue-on-collection-errors-> import failures from partial sync dependencies.Validation
python -m pytest backend\tests\unit\test_sync_pcm_decode.py --collect-only -q --tb=short-> 23 tests collectedpython -m pytest backend\tests\unit\test_sync_opus_decode.py --collect-only -q --tb=short-> 21 tests collectedpython -m pytest backend\tests\unit\test_action_item_date_validation.py backend\tests\unit\test_sync_pcm_decode.py backend\tests\unit\test_sync_opus_decode.py --collect-only -q --tb=short --continue-on-collection-errors-> 70 tests collectedpython -m pytest backend\tests\unit\test_sync_pcm_decode.py backend\tests\unit\test_sync_opus_decode.py -q --tb=short-> 44 passedpython -m pytest backend\tests\unit\test_sync_opus_decode.py backend\tests\unit\test_sync_pcm_decode.py -q --tb=short-> 44 passedpython -m pytest backend\tests\unit\test_action_item_date_validation.py backend\tests\unit\test_sync_pcm_decode.py backend\tests\unit\test_sync_opus_decode.py -q --tb=short-> 70 passedpython -m pytest backend\tests\unit\test_action_item_date_validation.py backend\tests\unit\test_sync_opus_decode.py backend\tests\unit\test_sync_pcm_decode.py -q --tb=short-> 70 passedpython -m pytest backend\tests\unit --collect-only -q --tb=short --continue-on-collection-errors-> still exits 1 from existing unrelated collection errors, but both sync decode files collect and no longer appear in the error summarypython -m black --line-length 120 --skip-string-normalization backend\tests\unit\test_sync_pcm_decode.py backend\tests\unit\test_sync_opus_decode.pypython -m py_compile backend\tests\unit\test_sync_pcm_decode.py backend\tests\unit\test_sync_opus_decode.pygit diff --checkscripts\pre-commit