Skip to content

Commit

Permalink
use match= parameter for pytest.raises
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed Nov 27, 2023
1 parent 531c614 commit 584dfff
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions wfc3tools/tests/test_calwf3.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@

def test_no_valid_input():
"""Run a very simple aliveness test."""
with pytest.raises(IOError) as e:
with pytest.raises(IOError, match='No valid image specified'):
def cal():
calwf3()
cal()
assert 'No valid image specified' in str(e.value)


def test_version_print():
Expand Down

0 comments on commit 584dfff

Please sign in to comment.