Skip to content

sharing test fixtures across subfolders is causing stdatamodels dowstream tests to fail #9543

@emolter

Description

@emolter

#9402 added some test fixtures that are used in jwst/datamodels/utils/tests as well as in jwst/combine_1d/tests and jwst/pipeline/tests. This construction is breaking the downstream tests for stdatamodels.

==================================== ERRORS ====================================
_ ERROR collecting .tox/py311-jwst-cov-xdist/lib/python3.11/site-packages/jwst/combine_1d/tests/test_combine1d.py _
ImportError while importing test module '/home/runner/work/stdatamodels/stdatamodels/.tox/py311-jwst-cov-xdist/lib/python3.11/site-packages/jwst/combine_1d/tests/test_combine1d.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py311-jwst-cov-xdist/lib/python3.11/site-packages/jwst/combine_1d/tests/test_combine1d.py:7: in <module>
    from jwst.datamodels.utils.tests.test_wfss_multispec import wfss_multiexposure, wfss_spec3_multispec, example_spec, N_SOURCES
E   ModuleNotFoundError: No module named 'jwst.datamodels.utils.tests'
_ ERROR collecting .tox/py311-jwst-cov-xdist/lib/python3.11/site-packages/jwst/pipeline/tests/test_calwebb_spec3.py _
ImportError while importing test module '/home/runner/work/stdatamodels/stdatamodels/.tox/py311-jwst-cov-xdist/lib/python3.11/site-packages/jwst/pipeline/tests/test_calwebb_spec3.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/hostedtoolcache/Python/3.11.12/x64/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.tox/py311-jwst-cov-xdist/lib/python3.11/site-packages/jwst/pipeline/tests/test_calwebb_spec3.py:9: in <module>
    from jwst.datamodels.utils.tests.test_wfss_multispec import wfss_multiexposure, wfss_spec3_multispec, example_spec
E   ModuleNotFoundError: No module named 'jwst.datamodels.utils.tests'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions