Skip to content

Commit

Permalink
TST: test template method bad arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
jakevdp committed Jun 7, 2015
1 parent f11ef71 commit a56fa53
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ doctest:
nosetests --with-doctest gatspy

test-coverage:
nosetests --with-coverage --cover-package=gatspy gatspy
nosetests --with-coverage --cover-package=gatspy
1 change: 0 additions & 1 deletion gatspy/periodic/tests/test_lomb_scargle.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def check_model(Model):

for Model in [LombScargle, LombScargleAstroML, LombScargleFast]:
yield check_model, Model



def test_lomb_scargle_std_vs_centered(N=100, period=1):
Expand Down
6 changes: 5 additions & 1 deletion gatspy/periodic/tests/test_templates.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from numpy.testing import assert_allclose
from numpy.testing import assert_allclose, assert_raises

from .. import RRLyraeTemplateModeler, RRLyraeTemplateModelerMultiband
from ...datasets import fetch_rrlyrae_templates, fetch_rrlyrae
Expand Down Expand Up @@ -60,3 +60,7 @@ def test_multiband_fit():
yfit_band.append(model.predict(tfit, period))

assert_allclose(yfit_all, yfit_band)


def test_bad_args():
assert_raises(ValueError, RRLyraeTemplateModeler, filts='abc')

0 comments on commit a56fa53

Please sign in to comment.