Skip to content

Commit

Permalink
Added some tests
Browse files Browse the repository at this point in the history
Python 3.x compliant
  • Loading branch information
Pica committed Dec 15, 2015
1 parent c37e436 commit ed6a9e9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions megaradrp/core/tests/test_processing.py
Expand Up @@ -53,7 +53,7 @@ def test_trim_and_o_fail():
with pytest.raises(ValueError) as excinfo:
trim_and_o('%s/flat.fits' % (temporary_path), out='%s/result.fits' % (temporary_path), direction=direction)
shutil.rmtree(temporary_path)
assert excinfo.value.message == "%s must be either 'normal' or 'mirror'" % direction
assert excinfo.value.args[0] == "%s must be either 'normal' or 'mirror'" % direction

def test_trim_and_o_fail2():
temporary_path = mkdtemp()
Expand All @@ -65,13 +65,13 @@ def test_trim_and_o_fail2():
with pytest.raises(ValueError) as excinfo:
trim_and_o('%s/flat.fits' % (temporary_path), out='%s/result.fits' % (temporary_path), bins=bins)
shutil.rmtree(temporary_path)
assert excinfo.value.message == "%s must be one if '11', '12', '21, '22'" % bins
assert excinfo.value.args[0] == "%s must be one if '11', '12', '21, '22'" % bins





# if __name__ == "__main__":
# test_trim_and_o()
# test_trim_and_o_fail()
# test_trim_and_o_fail2()
if __name__ == "__main__":
# test_trim_and_o()
test_trim_and_o_fail()
test_trim_and_o_fail2()

0 comments on commit ed6a9e9

Please sign in to comment.