• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

scikit-hep / iminuit / 31018032851
100%

Build:
DEFAULT BRANCH: develop
Ran 05 Aug 2026 03:02PM UTC
Jobs 1
Files 18
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Aug 2026 02:59PM UTC coverage: 99.616% (+0.001%) from 99.615%
31018032851

push

github

web-flow
fix: make hide_modules restore state and qtwidget report missing Qt (#1151)

I'm not sure why we are hiding and reloading modules, this is generally
frowned on in Python, but it was also buggy, so here's a fix.

:robot: _AI text below_ :robot:

Fixes two test failures that appear once ruff sorts imports (PR #1150),
and one latent state leak.

**`_hide_modules.hide_modules`**

- On exit it deleted the reloaded module from `sys.modules`, but a
package caches its submodules as attributes, so `from iminuit import
cost` kept returning the module that was imported while numba was
hidden. The attribute is now dropped too. This is why `import
iminuit.cost as cost` worked but the equivalent-looking `from iminuit
import cost` did not.
- `sys.meta_path` is now restored in a `finally` block, so a failed test
no longer leaves every module hidden for the rest of the session.
- The finder is removed by identity instead of by position, so it
survives another finder being inserted inside the block.
- `reload` now also accepts several module names.

**`qtwidget`**

It only caught `ModuleNotFoundError`. When no Qt binding at all is
installed, `matplotlib.backends.qt_compat` raises a plain `ImportError`,
so the hint to install PySide6 was lost and the user got "Failed to
import any of the following Qt binding modules". It now catches
`ImportError`.

New tests cover all of it. `tests/test_hide_modules.py` is new;
`test_interactive_without_any_qt_binding` hides every Qt binding, which
is the case CI hits.

23 of 23 new or added lines in 2 files covered. (100.0%)

3894 of 3909 relevant lines covered (99.62%)

1.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 31018032851.1 05 Aug 2026 03:02PM UTC 18
99.62
GitHub Action Run
Source Files on build 31018032851
  • Tree
  • List 18
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #31018032851
  • 46c16845 on github
  • Prev Build on develop (#30248843585)
  • Next Build on develop (#31019547774)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc