Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unittest errors on astropy >= 5.1 #124

Merged
merged 4 commits into from
Jan 10, 2023
Merged

Fix unittest errors on astropy >= 5.1 #124

merged 4 commits into from
Jan 10, 2023

Conversation

dylanagreen
Copy link
Contributor

This short PR performs four small tasks that allow specsim's unit tests to run on astropy versions >= 5.1, fixing #123:

  1. Comments out (but does not remove) the unused and currently deprecated and marked for future removal from astropy.tests.helper import enable_deprecations_as_exceptions from conftest.py
  2. Removes from astropy.tests.plugins.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS and associated commented out code from conftest.py
  3. Removes from astropy.tests.helper import remote_data from test_observations.py (where it was unused) and test_transform.py
  4. Replaces @remote_data with the recommended replacement @pytest.mark.remote_data in test_transform.py

These changes were necessitated from the changelog for astropy v5.1

There are no functional changes to the main body code of specsim, and the changes are confirmed backwards compatible with astropy 5.0.1.

@marcelo-alvarez
Copy link
Contributor

Thanks @dylanagreen. I verified that this fixes #123 on a fresh desiconda installation including astropy/5.2:

% source /global/common/software/desi/users/malvarez/desi_environment.sh local 2.0.1
% git clone --single-branch --fix-123 https://github.com/desihub/specsim
% cd specsim
% python setup.py test
...
============================================ 67 passed, 9 skipped, 15 warnings in 32.15s =============================================

Will merge now.

@marcelo-alvarez marcelo-alvarez merged commit 5cdaaf3 into main Jan 10, 2023
@marcelo-alvarez marcelo-alvarez deleted the fix-123 branch January 10, 2023 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants