Bug 2274117 - python-fslpy fails to build with pytest 8: ModuleNotFoundError: No module named 'tests'
Summary: python-fslpy fails to build with pytest 8: ModuleNotFoundError: No module nam...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-fslpy
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ankur Sinha (FranciscoD)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2256331
TreeView+ depends on / blocked
 
Reported: 2024-04-09 08:08 UTC by Tomáš Hrnčiar
Modified: 2024-07-30 11:45 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-07-30 11:45:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2024-04-09 08:08:08 UTC
python-fslpy fails to build with pytest 8.

==================================== ERRORS ====================================
________________ ERROR collecting fsl/tests/test_assertions.py _________________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_assertions.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_assertions.py:16: in <module>
    from . import make_random_image
E   ModuleNotFoundError: No module named 'tests'
_______________ ERROR collecting fsl/tests/test_atlases_query.py _______________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_atlases_query.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_atlases_query.py:19: in <module>
    from . import (testdir, make_random_mask)
E   ModuleNotFoundError: No module named 'tests'
___________________ ERROR collecting fsl/tests/test_dicom.py ___________________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_dicom.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_dicom.py:24: in <module>
    from . import mockFSLDIR, touch
E   ModuleNotFoundError: No module named 'tests'
__________________ ERROR collecting fsl/tests/test_ensure.py ___________________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_ensure.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_ensure.py:15: in <module>
    from . import make_random_image
E   ModuleNotFoundError: No module named 'tests'
____________ ERROR collecting fsl/tests/test_filetree/test_query.py ____________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_filetree/test_query.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_filetree/test_query.py:15: in <module>
    from .. import testdir
E   ModuleNotFoundError: No module named 'tests'
________________ ERROR collecting fsl/tests/test_freesurfer.py _________________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_freesurfer.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_freesurfer.py:22: in <module>
    from .test_mesh import (CUBE_VERTICES, CUBE_TRIANGLES_CCW)
E   ModuleNotFoundError: No module named 'tests'
______________ ERROR collecting fsl/tests/test_fsl_data_utils.py _______________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_fsl_data_utils.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_fsl_data_utils.py:28: in <module>
    from . import (touch,
E   ModuleNotFoundError: No module named 'tests'
______________ ERROR collecting fsl/tests/test_fsl_utils_path.py _______________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_fsl_utils_path.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_fsl_utils_path.py:20: in <module>
    from . import testdir
E   ModuleNotFoundError: No module named 'tests'
__________________ ERROR collecting fsl/tests/test_fslsub.py ___________________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_fslsub.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_fslsub.py:21: in <module>
    from . import mockFSLDIR
E   ModuleNotFoundError: No module named 'tests'
___________________ ERROR collecting fsl/tests/test_gifti.py ___________________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_gifti.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_gifti.py:18: in <module>
    from . import tempdir
E   ModuleNotFoundError: No module named 'tests'
___________________ ERROR collecting fsl/tests/test_image.py ___________________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_image.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_image.py:31: in <module>
    from . import make_random_image
E   ModuleNotFoundError: No module named 'tests'
______________ ERROR collecting fsl/tests/test_image_resample.py _______________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_image_resample.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_image_resample.py:14: in <module>
    from . import make_random_image
E   ModuleNotFoundError: No module named 'tests'
_________________ ERROR collecting fsl/tests/test_immv_imcp.py _________________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_immv_imcp.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_immv_imcp.py:22: in <module>
    from . import make_random_image
E   ModuleNotFoundError: No module named 'tests'
___________________ ERROR collecting fsl/tests/test_mesh.py ____________________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_mesh.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_mesh.py:16: in <module>
    from . import tempdir
E   ModuleNotFoundError: No module named 'tests'
________________ ERROR collecting fsl/tests/test_parse_data.py _________________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_parse_data.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_parse_data.py:15: in <module>
    from .test_image import make_image
E   ImportError: cannot import name 'make_image' from 'tests.test_image' (/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_image.py)
____________________ ERROR collecting fsl/tests/test_run.py ____________________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_run.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_run.py:23: in <module>
    from . import make_random_image, mockFSLDIR, CaptureStdout, touch
E   ModuleNotFoundError: No module named 'tests'
_____ ERROR collecting fsl/tests/test_scripts/test_atlasq_list_summary.py ______
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_scripts/test_atlasq_list_summary.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_scripts/test_atlasq_list_summary.py:15: in <module>
    from .. import CaptureStdout
E   ModuleNotFoundError: No module named 'tests'
__________ ERROR collecting fsl/tests/test_scripts/test_atlasq_ohi.py __________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_scripts/test_atlasq_ohi.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_scripts/test_atlasq_ohi.py:20: in <module>
    from .. import (tempdir,
E   ModuleNotFoundError: No module named 'tests'
_________ ERROR collecting fsl/tests/test_scripts/test_atlasq_query.py _________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_scripts/test_atlasq_query.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_scripts/test_atlasq_query.py:23: in <module>
    from .. import (tempdir,
E   ModuleNotFoundError: No module named 'tests'
_________ ERROR collecting fsl/tests/test_scripts/test_fsl_apply_x5.py _________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_scripts/test_fsl_apply_x5.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_scripts/test_fsl_apply_x5.py:15: in <module>
    from ..test_transform.test_nonlinear import _affine_field
E   ModuleNotFoundError: No module named 'tests'
____________ ERROR collecting fsl/tests/test_scripts/test_imglob.py ____________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_scripts/test_imglob.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_scripts/test_imglob.py:9: in <module>
    from .. import testdir
E   ModuleNotFoundError: No module named 'tests'
__________ ERROR collecting fsl/tests/test_scripts/test_immv_imcp.py ___________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_scripts/test_immv_imcp.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_scripts/test_immv_imcp.py:25: in <module>
    from .. import cleardir
E   ModuleNotFoundError: No module named 'tests'
________ ERROR collecting fsl/tests/test_scripts/test_resample_image.py ________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_scripts/test_resample_image.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_scripts/test_resample_image.py:14: in <module>
    from .. import make_random_image
E   ModuleNotFoundError: No module named 'tests'
___________ ERROR collecting fsl/tests/test_transform/test_flirt.py ____________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_transform/test_flirt.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_transform/test_flirt.py:19: in <module>
    from .. import make_random_image
E   ModuleNotFoundError: No module named 'tests'
___________ ERROR collecting fsl/tests/test_transform/test_fnirt.py ____________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_transform/test_fnirt.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_transform/test_fnirt.py:22: in <module>
    from .test_nonlinear import _random_affine_field
E   ModuleNotFoundError: No module named 'tests'
_____________ ERROR collecting fsl/tests/test_transform/test_x5.py _____________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_transform/test_x5.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_transform/test_x5.py:22: in <module>
    from .. import make_random_image
E   ModuleNotFoundError: No module named 'tests'
__________________ ERROR collecting fsl/tests/test_version.py __________________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_version.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_version.py:12: in <module>
    from . import testdir
E   ModuleNotFoundError: No module named 'tests'
___________ ERROR collecting fsl/tests/test_wrappers/test_cluster.py ___________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_wrappers/test_cluster.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_wrappers/test_cluster.py:23: in <module>
    from .  import testenv
E   ModuleNotFoundError: No module named 'tests'
__________ ERROR collecting fsl/tests/test_wrappers/test_fslmaths.py ___________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_wrappers/test_fslmaths.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_wrappers/test_fslmaths.py:16: in <module>
    from .. import mockFSLDIR, make_random_image
E   ModuleNotFoundError: No module named 'tests'
__________ ERROR collecting fsl/tests/test_wrappers/test_fslstats.py ___________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_wrappers/test_fslstats.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_wrappers/test_fslstats.py:17: in <module>
    from .. import mockFSLDIR as mockFSLDIR_base, make_random_image
E   ModuleNotFoundError: No module named 'tests'
__________ ERROR collecting fsl/tests/test_wrappers/test_wrappers.py ___________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_wrappers/test_wrappers.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_wrappers/test_wrappers.py:13: in <module>
    from . import checkResult, testenv
E   ModuleNotFoundError: No module named 'tests'
___ ERROR collecting fsl/tests/test_wrappers/test_wrappers_run_arguments.py ____
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_wrappers/test_wrappers_run_arguments.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_wrappers/test_wrappers_run_arguments.py:18: in <module>
    from .. import CaptureStdout
E   ModuleNotFoundError: No module named 'tests'
________ ERROR collecting fsl/tests/test_wrappers/test_wrapperutils.py _________
ImportError while importing test module '/builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_wrappers/test_wrapperutils.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
fsl/tests/test_wrappers/test_wrapperutils.py:29: in <module>
    from .. import mockFSLDIR, cleardir, checkdir, testdir, touch
E   ModuleNotFoundError: No module named 'tests'
=============================== warnings summary ===============================
fsl/tests/test_filetree/test_read.py:2
  /builddir/build/BUILD/fslpy-3.18.1/fsl/tests/test_filetree/test_read.py:2: DeprecationWarning: fsl.utils.filetree is deprecated from version 3.6.0 and will be removed in 4.0.0. The filetree package is now released as a separate Python library ("file-tree" on PyPi), and will be removed in a future version of fslpy.
    from fsl.utils import filetree

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
ERROR fsl/tests/test_assertions.py
ERROR fsl/tests/test_atlases_query.py
ERROR fsl/tests/test_dicom.py
ERROR fsl/tests/test_ensure.py
ERROR fsl/tests/test_filetree/test_query.py
ERROR fsl/tests/test_freesurfer.py
ERROR fsl/tests/test_fsl_data_utils.py
ERROR fsl/tests/test_fsl_utils_path.py
ERROR fsl/tests/test_fslsub.py
ERROR fsl/tests/test_gifti.py
ERROR fsl/tests/test_image.py
ERROR fsl/tests/test_image_resample.py
ERROR fsl/tests/test_immv_imcp.py
ERROR fsl/tests/test_mesh.py
ERROR fsl/tests/test_parse_data.py
ERROR fsl/tests/test_run.py
ERROR fsl/tests/test_scripts/test_atlasq_list_summary.py
ERROR fsl/tests/test_scripts/test_atlasq_ohi.py
ERROR fsl/tests/test_scripts/test_atlasq_query.py
ERROR fsl/tests/test_scripts/test_fsl_apply_x5.py
ERROR fsl/tests/test_scripts/test_imglob.py
ERROR fsl/tests/test_scripts/test_immv_imcp.py
ERROR fsl/tests/test_scripts/test_resample_image.py
ERROR fsl/tests/test_transform/test_flirt.py
ERROR fsl/tests/test_transform/test_fnirt.py
ERROR fsl/tests/test_transform/test_x5.py
ERROR fsl/tests/test_version.py
ERROR fsl/tests/test_wrappers/test_cluster.py
ERROR fsl/tests/test_wrappers/test_fslmaths.py
ERROR fsl/tests/test_wrappers/test_fslstats.py
ERROR fsl/tests/test_wrappers/test_wrappers.py
ERROR fsl/tests/test_wrappers/test_wrappers_run_arguments.py
ERROR fsl/tests/test_wrappers/test_wrapperutils.py
!!!!!!!!!!!!!!!!!!! Interrupted: 33 errors during collection !!!!!!!!!!!!!!!!!!!
================= 9 deselected, 1 warning, 33 errors in 0.64s ==================

https://docs.pytest.org/en/stable/changelog.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/thrnciar/pytest/fedora-rawhide-x86_64/07248126-python-fslpy/

For all our attempts to build python-fslpy with pytest 8, see:
https://copr.fedorainfracloud.org/coprs/thrnciar/pytest/package/python-fslpy/

Let us know here if you have any questions.

Pytest 8 is planned to be included in Fedora 41. And this bugzilla is a
heads up before we merge new pytest into rawhide. For more info see a Fedora Change
proposal https://fedoraproject.org/wiki/Changes/Pytest_8

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.


Note You need to log in before you can comment on or make changes to this bug.