Skip to content

Commit

Permalink
making the right error raise.
Browse files Browse the repository at this point in the history
  • Loading branch information
ntejos committed Nov 26, 2016
1 parent 55cac28 commit ff743d0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions linetools/tests/test_init_absline.py
Expand Up @@ -37,12 +37,11 @@ def test_failed_init():
with pytest.raises(ValueError):
abslin = AbsLine('HI Ly99')
with pytest.raises(ValueError):
sline = SpectralLine.from_dict(dict(ltype='wrong type'))
sline = SpectralLine.from_dict(dict(ltype='wrong ltype'))
with pytest.raises(ValueError):
sline = SpectralLine('wrong type')
sline = SpectralLine('wrong ltype', 1215.67*u.AA)
with pytest.raises(ValueError):
sline = SpectralLine('Abs', 'wrong trans')

sline = SpectralLine('Abs', dict(bad_trans='because I am dict, right?'))


def test_dicts():
Expand Down

0 comments on commit ff743d0

Please sign in to comment.