Skip to content

Commit

Permalink
MNT: Handle no pytest-astropy-header
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim committed Mar 26, 2020
1 parent 6045353 commit cfc8fee
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions astrowidgets/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
TESTED_VERSIONS)
except ImportError:
PYTEST_HEADER_MODULES = {}
TESTED_VERSIONS = {}

# Uncomment the following line to treat all DeprecationWarnings as
# exceptions.
Expand All @@ -17,13 +18,10 @@
# the list of packages for which version numbers are displayed when running
# the tests. Making it pass for KeyError is essential in some cases when
# the package uses other astropy affiliated packages.
try:
PYTEST_HEADER_MODULES['Astropy'] = 'astropy'
PYTEST_HEADER_MODULES['Ginga'] = 'ginga'
del PYTEST_HEADER_MODULES['h5py']
del PYTEST_HEADER_MODULES['Pandas']
except KeyError:
pass
PYTEST_HEADER_MODULES['Astropy'] = 'astropy'
PYTEST_HEADER_MODULES['Ginga'] = 'ginga'
PYTEST_HEADER_MODULES.pop('h5py')
PYTEST_HEADER_MODULES.pop('Pandas')

# Uncomment the following lines to display the version number of the
# package rather than the version number of Astropy in the top line when
Expand Down

0 comments on commit cfc8fee

Please sign in to comment.