Skip to content

python 3.11 updates #51

@jcermauwedu

Description

@jcermauwedu

pytest issues warning for python 3.11. Posting an issue as a reminder to apply similar fixes from the compliance checker and cc-plugin-glider. Shouldn't take too much to fix these.

$ pytest
========================================================= test session starts =========================================================
platform linux -- Python 3.11.9, pytest-8.2.0, pluggy-1.5.0
rootdir: /home/portal/src/cc-plugin-ncei
plugins: requests-mock-1.12.1, time-machine-2.14.1
collected 32 items                                                                                                                    

cc_plugin_ncei/tests/test_base.py ..                                                                                            [  6%]
cc_plugin_ncei/tests/test_feature_detection.py ..................                                                               [ 62%]
cc_plugin_ncei/tests/test_ncei_point.py ..                                                                                      [ 68%]
cc_plugin_ncei/tests/test_ncei_profile.py ..                                                                                    [ 75%]
cc_plugin_ncei/tests/test_ncei_timeseries.py ..                                                                                 [ 81%]
cc_plugin_ncei/tests/test_ncei_timeseries_profile.py ..                                                                         [ 87%]
cc_plugin_ncei/tests/test_ncei_trajectory.py ..                                                                                 [ 93%]
cc_plugin_ncei/tests/test_ncei_trajectory_profile.py ..                                                                         [100%]

========================================================== warnings summary ===========================================================
cc_plugin_ncei/tests/resources.py:1
  /home/portal/src/cc-plugin-ncei/cc_plugin_ncei/tests/resources.py:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pkg_resources import resource_filename

cc_plugin_ncei/tests/test_base.py::TestNCEIBase::test_valid_min_max
  /home/portal/src/cc-plugin-ncei/cc_plugin_ncei/tests/test_base.py:65: UserWarning: WARNING: valid_min cannot be safely cast to variable dtype
    var.valid_min, var.valid_max = '101', '102'

cc_plugin_ncei/tests/test_base.py::TestNCEIBase::test_valid_min_max
  /home/portal/src/cc-plugin-ncei/cc_plugin_ncei/tests/test_base.py:65: UserWarning: WARNING: valid_max cannot be safely cast to variable dtype
    var.valid_min, var.valid_max = '101', '102'

cc_plugin_ncei/tests/test_ncei_point.py: 2 warnings
cc_plugin_ncei/tests/test_ncei_profile.py: 2 warnings
cc_plugin_ncei/tests/test_ncei_timeseries.py: 2 warnings
cc_plugin_ncei/tests/test_ncei_timeseries_profile.py: 2 warnings
cc_plugin_ncei/tests/test_ncei_trajectory.py: 2 warnings
cc_plugin_ncei/tests/test_ncei_trajectory_profile.py: 2 warnings
  /home/portal/src/cc-plugin-ncei/cc_plugin_ncei/tests/ncei_test_case.py:51: UserWarning: suite.run is deprecated, use suite.run_all in calls instead
    score_groups = cs.run(ds, [], checker)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=================================================== 32 passed, 15 warnings in 1.07s ===================================================
Error in sys.excepthook:

Original exception was:
Error in sys.excepthook:

Original exception was:

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