Skip to content

Commit 615fc10

Browse files
committed
Merge pull request #488 from bsipocz/test_header_customization
Customizing test header version information
2 parents 54e6899 + 46f3996 commit 615fc10

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

astroquery/conftest.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,15 @@ def pytest_configure(config):
2626
except ImportError:
2727
# assume astropy v<0.3
2828
pass
29+
30+
31+
# Add astropy to test header information and remove unused packages.
32+
# Pytest header customisation was introduced in astropy 1.0.
33+
34+
try:
35+
PYTEST_HEADER_MODULES['astropy'] = 'astropy'
36+
del PYTEST_HEADER_MODULES['h5py']
37+
del PYTEST_HEADER_MODULES['Scipy']
38+
del PYTEST_HEADER_MODULES['Matplotlib']
39+
except NameError:
40+
pass

0 commit comments

Comments
 (0)