spacetelescope / jwst

Python library for science observations from the James Webb Space Telescope
https://jwst-pipeline.readthedocs.io/en/latest/
Other
561 stars 167 forks source link

refactor msa fail/nofail and association duplicate tests to not use caplog #8628

Closed braingram closed 2 months ago

braingram commented 3 months ago

The tests updated in this PR randomly fail (likely due to our complex logging and the pytest caplog fixture only using the root logger).

This PR removes the caplog fixture (from only these tests) and replaces it with a monkeypatch of the logger that emits the checked message.

Regression tests running (with jwst_1242.pmap since the new context is causing spec2 failures): https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/1581/ show 0 failures.

Checklist for PR authors (skip items if you don't have permissions or they are not applicable)

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 59.56%. Comparing base (d02ac25) to head (ccf871a). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #8628 +/- ## ======================================= Coverage 59.56% 59.56% ======================================= Files 391 391 Lines 39285 39285 ======================================= Hits 23402 23402 Misses 15883 15883 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

braingram commented 2 months ago

Thanks! 🤞 the random failures go away for good.