Skip to content

Commit

Permalink
Merge 773c95a into 4093e05
Browse files Browse the repository at this point in the history
  • Loading branch information
MSeifert04 committed Nov 24, 2019
2 parents 4093e05 + 773c95a commit b647f89
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Expand Up @@ -61,15 +61,15 @@ matrix:
SETUP_CMD='test --coverage'

# Check compatibility with the current astropy LTS release
- python: 3.6
env: ASTROPY_VERSION=2
- env: ASTROPY_VERSION=2
PYTEST_VERSION=3.6
PYTHON_VERSION=3.6

- python: 3.5
env: NUMPY_VERSION=1.13
- env: NUMPY_VERSION=1.14
PYTHON_VERSION=3.5

- python: 3.6
env: NUMPY_VERSION=1.14
- env: NUMPY_VERSION=1.15
PYTHON_VERSION=3.6

# Try numpy pre-release version. This runs only when a pre-release
# is available on pypi.
Expand Down
25 changes: 19 additions & 6 deletions ccdproc/conftest.py
Expand Up @@ -7,16 +7,29 @@
import os

try:
from astropy.tests.plugins.display import (pytest_report_header,
PYTEST_HEADER_MODULES,
# 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:
# When using astropy 2.0
from astropy.tests.pytest_plugins import (pytest_report_header,
PYTEST_HEADER_MODULES,
TESTED_VERSIONS)
# TODO: Remove this when astropy 2.x and 3.x support is dropped.
# Probably an old pytest-astropy package where the pytest_astropy_header
# is not a dependency.
try:
from astropy.tests.plugins.display import (pytest_report_header,
PYTEST_HEADER_MODULES,
TESTED_VERSIONS)
except ImportError:
# TODO: Remove this when astropy 2.x support is dropped.
# If that also did not work we're probably using astropy 2.0
from astropy.tests.pytest_plugins import (pytest_report_header,
PYTEST_HEADER_MODULES,
TESTED_VERSIONS)

try:
# TODO: Remove this when astropy 2.x support is dropped.
# This is the way to get plugins in astropy 2.x
from astropy.tests.pytest_plugins import *
except ImportError:
Expand Down

0 comments on commit b647f89

Please sign in to comment.