MNT: Refactor the way astropy.utils.data is monkeypatched in tests
Open
refactor
testing
utils
- Dominant language
- Python
- Stars
- 791
- Forks
- 451
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 4
Description
Over the years, every time `astropy/utils/data.py`, particularly its `get_pkg_data_fileobj` function, is refactored, it tends to break the tests here in `astroquery`. It would be good to consider refactoring the way you mock or monkeypatch this code to avoid constant patching of the monkeypatch.
Examples: #2059 #1711
Contributor guide
Research direction
Start by reviewing tests that mock or monkeypatch astropy.utils.data.py, particularly get_pkg_data_fileobj, and compare the breakages described in issues #2059 and #1711. Determine a less fragile test boundary; done means upstream refactors of that function no longer require repeatedly updating astroquery's monkeypatching tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100