From 46f39960999f1ff256ba2b61c2bc98249e503b14 Mon Sep 17 00:00:00 2001 From: Brigitta Sipocz Date: Mon, 23 Feb 2015 15:13:15 +0000 Subject: [PATCH] Customizing test header version information, removing version for unused packages, and adding astropy version --- astroquery/conftest.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/astroquery/conftest.py b/astroquery/conftest.py index 065ba0069e..9bca6d3f69 100644 --- a/astroquery/conftest.py +++ b/astroquery/conftest.py @@ -26,3 +26,15 @@ def pytest_configure(config): except ImportError: # assume astropy v<0.3 pass + + +# Add astropy to test header information and remove unused packages. +# Pytest header customisation was introduced in astropy 1.0. + +try: + PYTEST_HEADER_MODULES['astropy'] = 'astropy' + del PYTEST_HEADER_MODULES['h5py'] + del PYTEST_HEADER_MODULES['Scipy'] + del PYTEST_HEADER_MODULES['Matplotlib'] +except NameError: + pass