Repository navigation
TST: Run the new univariate tests without matplotlib - #960
Merged
Merged
Conversation
test_positions_and_alias.py, test_string_options.py and test_validation_base.py imported matplotlib.pyplot at module level, so they could not be collected where matplotlib is not installed, as in the tests of the arch-wheels builds. Import it only if it is available, as the other tests do, and skip the plot and hedgehog_plot tests and table rows without it.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #960 +/- ##
==========================================
- Coverage 98.97% 98.95% -0.02%
==========================================
Files 136 136
Lines 30028 30043 +15
Branches 2327 2331 +4
==========================================
+ Hits 29719 29729 +10
- Misses 255 256 +1
- Partials 54 58 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bashtage
added a commit
that referenced
this pull request
Oct 18, 2026
Add a Linux job, python_313_no_matplotlib_wheel, that installs neither matplotlib nor seaborn and tests the installed wheel from outside of the source tree, as the tests of the arch-wheels builds do. The install step fails if another package installs matplotlib anyway. A test module that imports matplotlib unconditionally, as three did before #960, then fails to collect in CI instead of in the wheel builds.
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.
Branch
a90-fix-tests-without-matplotlib, one commit on main 80d3688.The arch-wheels trial run (after arch-wheels#29) failed on every platform and
Python version. One cause was the 7 dtype tests that #957 has since fixed. The
other is still on main: three test modules that are new in this release import
matplotlib.pyplotat module level:arch/tests/univariate/test_positions_and_alias.pyarch/tests/univariate/test_string_options.pyarch/tests/univariate/test_validation_base.pyThe arch-wheels test environment does not install matplotlib, so these modules
fail to be collected (
ModuleNotFoundError: No module named 'matplotlib').arch's own CI always installs matplotlib, so it never showed there.
Fix (tests only), following the existing tests (
test_hedgehog_plot.py,test_mean.py):matplotlib.pyplotonly ifarch.compat.matplotlib.HAS_MATPLOTLIB;plotandhedgehog_plottests and table rows without it;With matplotlib blocked (the three modules, one process): 854 passed, 133
skipped, 0 failed (before: collection errors, and 349 failures once the import
was guarded but the plot tests were not skipped). With matplotlib: fast suite
26,955 passed.
🤖 Generated with Claude Code