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 test failure when h5py and matplotlib are not installed #218

Closed
wants to merge 1 commit into from
Closed

Fix test failure when h5py and matplotlib are not installed #218

wants to merge 1 commit into from

Conversation

smaret
Copy link
Member

@smaret smaret commented Feb 25, 2020

h5py and matplotlib are optional dependencies of astropy. When these are not installed, reproject tests fail with the following error:

reproject/conftest.py:15: in <module>
    del PYTEST_HEADER_MODULES['h5py']
E   KeyError: 'h5py'

This PR fixes the tests.

reproject/conftest.py Outdated Show resolved Hide resolved
Co-Authored-By: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
@smaret
Copy link
Member Author

smaret commented Feb 26, 2020

I don't understand why codecov complains. conftest.py is excluded from the coverage tests in reproject/tests/coveragerc:

[run]
source = {packagename}
omit =
   {packagename}/_astropy_init*
   {packagename}/conftest*

@astrofrog
Copy link
Member

This should now be fixed in master:

PYTEST_HEADER_MODULES.pop('Pandas', None)
PYTEST_HEADER_MODULES.pop('h5py', None)
PYTEST_HEADER_MODULES.pop('Matplotlib', None)

so I'll close this - thanks for the PR!

@astrofrog astrofrog closed this Apr 2, 2020
@smaret smaret deleted the fix-tests branch April 2, 2020 16:46
@smaret smaret restored the fix-tests branch April 2, 2020 16:47
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.

None yet

3 participants