Skip to content

Commit

Permalink
simplifying test matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorris3 committed Nov 8, 2017
1 parent c6a9fb5 commit d740239
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
14 changes: 5 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ env:
- MAIN_CMD='python setup.py'
- SETUP_CMD='test -V'
- CONDA_CHANNELS='astropy astropy-ci-extras conda-forge'
- CONDA_DEPENDENCIES='matplotlib numpy scipy sphinx-automodapi numpydoc'
- CONDA_DEPENDENCIES='matplotlib numpy scipy sphinx-automodapi numpydoc pytest'
- EVENT_TYPE='pull_request push'
- ASTROPY_USE_SYSTEM_PYTEST=1

Expand All @@ -50,7 +50,10 @@ matrix:

include:
# Try MacOS X
- os: osx
#- os: osx
# env: SETUP_CMD='test -V'

- os: linux
env: SETUP_CMD='test -V'

# Check for sphinx doc build warnings - we do this first because it
Expand All @@ -66,13 +69,6 @@ matrix:
- os: linux
env: PYTHON_VERSION=2.7 ASTROPY_VERSION=lts

- os: linux
env: ASTROPY_VERSION=lts

# Try numpy pre-release
- os: linux
env: NUMPY_VERSION=prerelease
EVENT_TYPE='pull_request push cron'

allow_failures:
# Do a PEP8 test with pycodestyle
Expand Down
6 changes: 4 additions & 2 deletions mrspoc/tests/test_centroid.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import numpy as np
import pytest

from ..star import Star, Spot


def test_col_methods():
@pytest.mark.parametrize('x', (0.8, 0.6, 0.4, 0.2, 0.0))
def test_col_methods(x):
"""
python -c "from mrspoc.tests.test import test_col_methods as f; f()"
"""

star = Star()
star.spots = [Spot(x=0.8, y=0.00, r=0.2)]
star.spots = [Spot(x=x, y=0.00, r=0.2)]

x0, y0 = star._centroid_analytic()
x1, y1 = star._centroid_numerical()
Expand Down

0 comments on commit d740239

Please sign in to comment.