Skip to content

Warnings being raised by test suite #150

@WilliamJamieson

Description

@WilliamJamieson

Several warnings are being raised by the test suite. If they are the result of intentional actions in the test suite, then they should be captured or filtered by the offending tests. Otherwise the root causes of the warnings should be resolved.

The current warnings include:

tests/test_dark_current.py::test_frame_averaging[DEEP8-3-8-12-20-20]
tests/test_dark_current.py::test_frame_averaging[DEEP2-3-2-18-20-20]
tests/test_dark_current.py::test_frame_averaging[MEDIUM8-3-8-2-20-20]
tests/test_dark_current.py::test_frame_averaging[MEDIUM2-3-2-8-20-20]
tests/test_dark_current.py::test_frame_averaging[SHALLOW4-3-4-1-20-20]
tests/test_dark_current.py::test_frame_averaging[SHALLOW2-3-2-3-20-20]
  /Users/runner/work/stcal/stcal/src/stcal/dark_current/dark_sub.py:224: RuntimeWarning: Mean of empty slice.
    avg_dark.data[group] = dark_data.data[start:end].mean(axis=0)
  
  tests/test_dark_current.py::test_frame_averaging[DEEP8-3-8-12-20-20]
  tests/test_dark_current.py::test_frame_averaging[DEEP2-3-2-18-20-20]
  tests/test_dark_current.py::test_frame_averaging[MEDIUM8-3-8-2-20-20]
  tests/test_dark_current.py::test_frame_averaging[MEDIUM2-3-2-8-20-20]
  tests/test_dark_current.py::test_frame_averaging[SHALLOW4-3-4-1-20-20]
  tests/test_dark_current.py::test_frame_averaging[SHALLOW2-3-2-3-20-20]
    /Users/runner/work/stcal/stcal/.tox/test-xdist/lib/python3.10/site-packages/numpy/core/_methods.py:184: RuntimeWarning: invalid value encountered in divide
      ret = um.true_divide(
  
  tests/test_dark_current.py::test_frame_averaging[DEEP8-3-8-12-20-20]
  tests/test_dark_current.py::test_frame_averaging[DEEP2-3-2-18-20-20]
  tests/test_dark_current.py::test_frame_averaging[MEDIUM8-3-8-2-20-20]
  tests/test_dark_current.py::test_frame_averaging[MEDIUM2-3-2-8-20-20]
  tests/test_dark_current.py::test_frame_averaging[SHALLOW4-3-4-1-20-20]
  tests/test_dark_current.py::test_frame_averaging[SHALLOW2-3-2-3-20-20]
    /Users/runner/work/stcal/stcal/.tox/test-xdist/lib/python3.10/site-packages/numpy/core/fromnumeric.py:34[64](https://github.com/spacetelescope/stcal/actions/runs/4341653456/jobs/7581529592#step:5:65): RuntimeWarning: Mean of empty slice.
      return _methods._mean(a, axis=axis, dtype=dtype,
  
  tests/test_dark_current.py::test_frame_averaging[DEEP8-3-8-12-20-20]
  tests/test_dark_current.py::test_frame_averaging[DEEP2-3-2-18-20-20]
  tests/test_dark_current.py::test_frame_averaging[MEDIUM8-3-8-2-20-20]
  tests/test_dark_current.py::test_frame_averaging[MEDIUM2-3-2-8-20-20]
  tests/test_dark_current.py::test_frame_averaging[SHALLOW4-3-4-1-20-20]
  tests/test_dark_current.py::test_frame_averaging[SHALLOW2-3-2-3-20-20]
    /Users/runner/work/stcal/stcal/.tox/test-xdist/lib/python3.10/site-packages/numpy/core/_methods.py:192: RuntimeWarning: invalid value encountered in divide
      ret = ret.dtype.type(ret / rcount)
  
  tests/test_twopoint_difference.py::test_10grps_nocr_2pixels_sigma0
  tests/test_twopoint_difference.py::test_2group
  tests/test_twopoint_difference.py::test_first_last_3group
  tests/test_twopoint_difference.py::test_first_last_4group
    /Users/runner/work/stcal/stcal/src/stcal/jump/twopoint_difference.py:154: RuntimeWarning: All-NaN slice encountered
      max_ratio = np.nanmax(ratio, axis=0)
  
  -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

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