Skip to content

Commit

Permalink
Accept TypeError or ValueError in tests
Browse files Browse the repository at this point in the history
Seems like exceptions differ by Python version; some are TypeError,
some are ValueError?
  • Loading branch information
endolith committed Jul 22, 2024
1 parent 6142688 commit 5083e93
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_ABC_weighting.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def test_freq_resp(self):

class TestAWeighting:
def test_invalid_params(self):
with pytest.raises(ValueError):
with pytest.raises((ValueError, TypeError)):
A_weighting(fs='spam')

with pytest.raises(ValueError):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ITU_R_468_weighting.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def test_freq_resp(self):

class TestITU468Weighting:
def test_invalid_params(self):
with pytest.raises(ValueError):
with pytest.raises((ValueError, TypeError)):
ITU_R_468_weighting(fs='spam')

with pytest.raises(ValueError):
Expand Down

0 comments on commit 5083e93

Please sign in to comment.