Skip to content

TEST: Make FormatManager tests independent of imageio-ffmpeg (#1013) - #1210

Merged
FirefoxMetzger merged 2 commits into
imageio:masterfrom
cpruijsen:fix/issue-1013
Sep 26, 2026
Merged

FirefoxMetzger merged 2 commits into
imageio:masterfrom
cpruijsen:fix/issue-1013

Conversation

@cpruijsen

Copy link
Copy Markdown
Contributor

Fixes #1013.

test_preferring_arbitrary and test_missing_format fail when imageio-ffmpeg is not installed (Debian's situation). Legacy FormatManager already skips FFMPEG in that case (#887); the tests assumed the extra was present.

  • test_preferring_arbitrary now sorts DICOM / BSDF / NPZ (in-tree plugins, no extra) instead of FFMPEG.
  • missing_ffmpeg uses sys.modules.pop(..., None) and only restores modules that existed, so setup does not KeyError when imageio.plugins.ffmpeg was never imported.

Decision

  • Chose: run both tests with no imageio-ffmpeg.
  • Alternative: skipif / importorskip when the extra is missing (as in tests/test_ffmpeg.py).
  • Why: the issue asks that the tests "run independently of the imageio-ffmpeg package," not that they be skipped. Happy to switch test_preferring_arbitrary back to FFMPEG behind a skip if you would rather keep that name in the sort list.

Note to Maintainers

Remember to squash-merge the PR and to use an appropriate tag in the commit message title.
Tags are necessary, so that the CD pipeline can correctly pick up and advertize this PR.
A full list of available tags (and how to format them) can be found here:

@FirefoxMetzger

Copy link
Copy Markdown
Contributor

Thanks @cpruijsen , this looks good. letting CI run and assuming it comes back green I will merge.

@FirefoxMetzger
FirefoxMetzger merged commit 3b19327 into imageio:master Sep 26, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some tests fail if imageio-ffmpeg is not installed

2 participants