Repository navigation
main train 2026-11-14: guard test, every proteus.mprans module imports alone - #1363
Merged
Merged
Conversation
Guard against `import proteus` + attribute use (proteus.StepControl, proteus.SubgridError, ...) that only works when something else imported the submodule first: one pytest process per file (LSU QB 1.9.1 module tests) exposed it as "module 'proteus' has no attribute 'StepControl'" in MCorr. Each module gets its own subprocess; a missing third-party dependency skips. Before: no test; 1.9.x had 6 of 30 modules failing alone (Dissipation, Kappa, NCLS, RDLS, SW2D, MCorr), fixed in #284. After: on main (c9cc8f6) all 32 modules pass alone (macOS arm64, env proteus-hotstart-261025, extensions rebuilt in the worktree); main already carries cfe3611 and MCorr's imports, so this commit is the test only. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
This pull request was reviewed, and passed CI, as its own pull request on cekees/proteus. This branch merges it onto
mainat 33659c3 with one merge commit.Merge with "Create a merge commit", not squash or rebase, so the commit keeps its hash and the fork's pull request closes itself.
Adds
test/test_mprans_import_isolation.py, which imports eachproteus.mpransmodule in its own interpreter and fails if any needs another module imported first. Onmainevery module passes already (the missing imports were fixed in cfe3611); the test keeps it that way. The same test, together with the five imports and the MCorr import-order fix it found missing, is in #1362 for the 1.9.x line.Diff against
main: 1 file changed, 44 insertions(+).🤖 Generated with Claude Code