Skip to content

Commit

Permalink
added some more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewAnnex committed Nov 4, 2017
1 parent f46840b commit c3687b2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions spiceypy/tests/test_spiceerrors.py
Expand Up @@ -105,3 +105,18 @@ def test_found_check():
spice.found_check_on()
assert spice.get_found_catch_state()
spice.kclear()


def test_multiple_founds():
success = spice.stypes.SpiceyError(value="test", found=(True, True))
assert all(success.found)
failed = spice.stypes.SpiceyError(value="test",found=(True, False))
assert not all(failed.found)
# def test_fun
@spice.spiceFoundExceptionThrower
def test_fun():
return [0, 0], [False, True]
# test it
with pytest.raises(spice.stypes.SpiceyError):
a = test_fun()

0 comments on commit c3687b2

Please sign in to comment.