Fix pytest collection errors#603
Open
patkenneally wants to merge 17 commits into
Open
Conversation
The warning originates in datashader/hvplot, not xmera, so suppress FutureWarnings from dask.dataframe at the pytest layer (module-scoped because the message begins with a newline that defeats pytest's anchored regex).
The S frame is defined as cross(omega, r0)/|cross(omega, r0)|, so omega = 0 is degenerate and produces NaN truth values.
…test The existing zero-norm check fired after the divide; reordering avoids the RuntimeWarning without changing observable behavior.
matplotlib silently discards figsize/dpi/etc. when figure N already exists, so close it first so the styling args take effect.
matplotlib silently discards figsize/dpi/etc. when figure N already exists, so close it first so the styling args take effect.
matplotlib silently discards figsize/dpi/etc. when figure 1 already exists, so close it first so the styling args take effect.
matplotlib silently discards figsize/dpi/etc. when figure N already exists, so close each first so the styling args take effect.
The 13-case parametrize leaves figures open across iterations, so later iterations silently discard the styling args.
The 5-case parametrize leaves figures open across iterations, so later iterations silently discard the styling args.
The large parametrize matrix leaves figure 1 open across iterations, so later iterations silently discard the styling args.
The prior 'if integratorCase == rk4' guard only reset state on the first iteration, leaving later cases unstyled.
The prior 'if integratorCase == rk4' guard only reset state on the first call, leaving later cases unstyled.
Lets test files use bare-name imports like `from Support.X import Y` without requiring the surrounding directories to be Python packages, which is what unblocks switching to importlib mode.
Drops the leading dot so the import no longer requires the test file to be loaded as part of a package; the conftest collect hook adds the test's directory to sys.path so Support resolves directly.
Drops the fswAlgorithms.orbitControl.lambertSolver._UnitTest prefix so the import no longer requires those directories to be packages on sys.path.
Removes the need for __init__.py files in test directories and isolates test module imports from each other; bare-name Support imports and the conftest sys.path hook keep collection working.
Each worker appends the current test nodeid to its own log file; tailing the files identifies which test was running just before a stall or worker crash.
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.
Description
Switch pytest to
--import-mode=importlibso test modules no longer require package-style__init__.pyfiles.This PR also resolves a range of pytest warnings summary from the test suite;
simpleVoltEstimator,coarseSunSensor,imuSensor,orbElemConvert,Integrators,scenarioIntegrators.pytest_collectstarthook that puts each test module's directory on sys.path; convertedtest_thrForceMapping.pyandtest_lambertSolver.pyto Support.X imports; adjusted pytest.ini to--import-mode=importlib.Verification
Successful CI and absence of pytest warnings.
Documentation
NA
Future work
None