Skip to content

Commit 0b02ddc

Browse files
committed
Adding top level conftest to make the test header work with tox
1 parent d3d39c2 commit 0b02ddc

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

conftest.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2+
3+
from pytest_astropy_header.display import (PYTEST_HEADER_MODULES,
4+
TESTED_VERSIONS)
5+
6+
7+
def pytest_configure(config):
8+
config.option.astropy_header = True
9+
10+
PYTEST_HEADER_MODULES['Astropy'] = 'astropy'
11+
PYTEST_HEADER_MODULES['APLpy'] = 'aplpy'
12+
PYTEST_HEADER_MODULES['pyregion'] = 'pyregion'
13+
PYTEST_HEADER_MODULES['regions'] = 'regions'
14+
PYTEST_HEADER_MODULES['pyVO'] = 'pyvo'
15+
PYTEST_HEADER_MODULES['mocpy'] = 'mocpy'
16+
PYTEST_HEADER_MODULES['astropy-healpix'] = 'astropy_healpix'
17+
PYTEST_HEADER_MODULES['vamdclib'] = 'vamdclib'
18+
19+
# keyring doesn't provide __version__ any more
20+
# PYTEST_HEADER_MODULES['keyring'] = 'keyring'
21+
22+
del PYTEST_HEADER_MODULES['h5py']
23+
del PYTEST_HEADER_MODULES['Scipy']
24+
del PYTEST_HEADER_MODULES['Pandas']
25+
26+
# add '_testrun' to the version name so that the user-agent indicates that
27+
# it's being run in a test
28+
from astroquery import version
29+
version.version += '_testrun'
30+
31+
TESTED_VERSIONS['astroquery'] = version.version
32+
TESTED_VERSIONS['astropy_helpers'] = version.astropy_helpers_version

0 commit comments

Comments
 (0)