diff options
Diffstat (limited to 'testing/python/raises.py')
-rw-r--r-- | testing/python/raises.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/testing/python/raises.py b/testing/python/raises.py index 183259f6b..156319816 100644 --- a/testing/python/raises.py +++ b/testing/python/raises.py @@ -61,6 +61,11 @@ class TestRaises(object): with pytest.raises(TypeError): pytest.raises('wrong', lambda: None) + def test_invalid_arguments_to_raises(self): + with pytest.raises(TypeError, match='unknown'): + with pytest.raises(TypeError, unknown='bogus'): + raise ValueError() + def test_tuple(self): with pytest.raises((KeyError, ValueError)): raise KeyError('oops') |