Skip to content

Failing tests in test_bioformats.py #416

@GenevieveBuckley

Description

@GenevieveBuckley

Tests are failing in test_bioformats.py. I noticed this while working on PR #403, but it seems to happen for all branches, so I don't think it's caused by my code.

To create a test environment, including dependencies for video files:

conda create -n pims-dev python=3.9 pip ipython
conda activate pims-dev
cd GitHub/pims
python -m pip install -r requirements-dev.txt
python -m pip install -e .
conda install -c conda-forge av imageio-ffmpeg moviepy tifffile

To run the tests:

python download_bioformats_test.py
pytest pims/tests/test_bioformats.py -vv

Problems encountered:

  • Inconsistent failing tests. In test_bioformats.py I see a lot of test_repr failures, but when I run just the single test it passes fine. Commenting out test_repr leads to other tests failing (that again, pass fine when run individually). Is something weird happening where the test files are not being closed properly? I don't know how to debug this.
  • There's something wrong with the norpix reader. It can't open the HEART.SEQ test image file. Oddly, all of the tests in pytest pims/tests/test_norpix.py pass. But pytest pims/tests/test_bioformats::TestBioformatsSEQ::test_open fails.

More weird stuff I have noticed:

  • Only the PyAV reader can open the file pims/tests/data/bioformats/wtembryo.mov. If PyAV is not available, sometimes other handlers try and fail (which casues a test failure). Given that this file will play in VLC but not QuickTime, I assume that's something to do with the codecs? I don't think this is a problem, because at least something can open the file, but it does mean you must have PyAV installed as a dependency for the tests not to fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions