Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Warnings are raised by the test suite #129

Closed
WilliamJamieson opened this issue Mar 8, 2023 · 0 comments · Fixed by #143
Closed

Warnings are raised by the test suite #129

WilliamJamieson opened this issue Mar 8, 2023 · 0 comments · Fixed by #143
Labels
bug Something isn't working tests

Comments

@WilliamJamieson
Copy link
Collaborator

When I run the tests in roman_datamodels locally, I am currently getting 44 warnings. Ideally, we should address and correct these warnings as they appear in the suite, either by ignoring them (if we feel they are irrelevant) or by resolving the cause of the waning itself.

The warning report I am currently getting is:

tests/test_models.py:234
tests/test_models.py:234
tests/test_models.py:234
tests/test_models.py:234
tests/test_models.py:234
tests/test_models.py:234
tests/test_models.py:234
tests/test_models.py:234
  /Users/wjamieson/projects/tmp/astropy-vounit/roman_datamodels/tests/test_models.py:234: PytestUnknownMarkWarning: Unknown pytest.mark.set_up_list_of_l2_files_data - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.set_up_list_of_l2_files_data(2, "asdf")

tests/test_models.py:265
tests/test_models.py:265
tests/test_models.py:265
tests/test_models.py:265
tests/test_models.py:265
tests/test_models.py:265
tests/test_models.py:265
tests/test_models.py:265
  /Users/wjamieson/projects/tmp/astropy-vounit/roman_datamodels/tests/test_models.py:265: PytestUnknownMarkWarning: Unknown pytest.mark.set_up_list_of_l2_files_data - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.set_up_list_of_l2_files_data(2, "asdf")

tests/test_factories.py: 7 warnings
tests/test_stnode.py: 5 warnings
  /Users/wjamieson/.pyenv/versions/3.11.2/envs/astropy-vounit/lib/python3.11/site-packages/erfa/core.py:154: ErfaWarning: ERFA function "d2dtf" yielded 1 of "dubious year (Note 5)"
    warnings.warn('ERFA function "{}" yielded {}'.format(func_name, wmsg),

tests/test_factories.py: 7 warnings
tests/test_stnode.py: 5 warnings
  /Users/wjamieson/.pyenv/versions/3.11.2/envs/astropy-vounit/lib/python3.11/site-packages/erfa/core.py:154: ErfaWarning: ERFA function "dtf2d" yielded 1 of "dubious year (Note 6)"
    warnings.warn('ERFA function "{}" yielded {}'.format(func_name, wmsg),

tests/test_factories.py::test_factory_method_implemented[IpcRef]
tests/test_factories.py::test_instance_valid[IpcRef]
tests/test_stnode.py::test_serialization[IpcRef]
  /Users/wjamieson/.pyenv/versions/3.11.2/envs/astropy-vounit/lib/python3.11/site-packages/numpy/core/fromnumeric.py:86: RuntimeWarning: overflow encountered in reduce
    return ufunc.reduce(obj, axis, dtype, out, **passkwargs)

tests/test_stuserdict.py::test_init
  /Users/wjamieson/projects/tmp/astropy-vounit/roman_datamodels/tests/test_stuserdict.py:17: DeprecationWarning: Passing 'dict' as keyword argument is deprecated
    user_dict_4 = STUserDict(dict=input_1)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants