[2.4.1] test_less_strict_verify_option tests for the wrong warning
- Dominant language
- Python
- Stars
- 93
- Forks
- 92
- Avg merge
- 14h 44m
- Merged PRs (30d)
- 30
Description
With the new pytest (and new Astropy), we seem to get an `AstropyUserWarning` instead of a `VerifyWarning` with invalid keywords on Debian:
```
____________ TestImageFileCollection.test_less_strict_verify_option ____________
self =
triage_setup = .Result object at 0x7f689477b490>
def test_less_strict_verify_option(self, triage_setup):
# Tests for feature request
#
# https://github.com/astropy/ccdproc/issues/607
#
# which would allow reading of otherwise invalid FITS headers.
bad_header = """
NAXIS1 = 10 / length of data axis 1
NAXIS2 = 10 / length of data axis 2
TESTVERI= '2017/02/13-16:51:38 / Test VerifyWarning
"""
> with pytest.warns(VerifyWarning):
E astropy.utils.exceptions.AstropyUserWarning: The following header keyword is invalid or follows an unrecognized non-standard convention:
E 17/02/13-16:51:38 / Test VerifyWarning
/<>/.pybuild/cpython3_3.11_ccdproc/build/ccdproc/tests/test_image_collection.py:968: AstropyUserWarning
```
This happens on both Python 3.11 and Python 3.12.
* pytest-8.0.2
* astropy 6.0.0
[Full build log](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066770)
Contributor guide
Research direction
Start with ccdproc/tests/test_image_collection.py and the TestImageFileCollection.test_less_strict_verify_option test shown in the report. Reproduce it with Python 3.11 or 3.12 and the listed pytest and Astropy versions, then check the warning behavior across supported versions. Done means the test accurately matches the warning raised for invalid keywords and passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100