-
-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathconftest.py
30 lines (23 loc) · 1.01 KB
/
conftest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Licensed under a 3-clause BSD style license - see LICENSE.rst
# this contains imports plugins that configure py.test for astropy tests.
# by importing them here in conftest.py they are discoverable by py.test
# no matter how it is invoked within the source tree.
try:
# When the pytest_astropy_header package is installed
from pytest_astropy_header.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS
def pytest_configure(config):
config.option.astropy_header = True
except ImportError:
PYTEST_HEADER_MODULES = {}
TESTED_VERSIONS = {}
# This is to figure out ccdproc version, rather than using Astropy's
try:
from ccdproc import __version__ as version
except ImportError:
version = "dev"
TESTED_VERSIONS["ccdproc"] = version
# Add astropy to test header information and remove unused packages.
PYTEST_HEADER_MODULES["Astropy"] = "astropy"
PYTEST_HEADER_MODULES["astroscrappy"] = "astroscrappy"
PYTEST_HEADER_MODULES["reproject"] = "reproject"
PYTEST_HEADER_MODULES.pop("h5py", None)