Repository navigation
test(stage): give the stage doubles the in-flight layer hooks - #4704
Merged
Merged
Conversation
`run_layer_stage` records and clears the in-flight layer so a cancelled or failed quantize restores its placement (#4546). The fifteen `DummyLooper` doubles in `tests/test_stage_modules.py` only model the stage protocol and were never extended, so seven tests failed on `main` with `AttributeError: 'DummyLooper' object has no attribute '_track_inflight_layer'`. Add one shared mixin with the two no-ops instead of fifteen copies.
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
Test-only follow-up to #4546.
run_layer_stagenow records and clears the in-flight layer so a cancelled or failedquantize()restores the layer's placement, but the fifteenDummyLooperdoubles intests/test_stage_modules.pyonly model the stage protocol and were never extended. Seven tests have been red onmainsince that merge:Rather than fifteen copies, one shared
_StageLooperDoublemixin provides the two no-ops and every double inherits it.Validation
pytest tests/test_stage_modules.py -q→ 52 passed (was 45 passed, 7 failed on unmodifiedmain; I reproduced the same 7 failures on a pristinemainworktree before changing anything).ruff check tests/test_stage_modules.pyclean.No production code changes.