diff --git a/AUTHORS b/AUTHORS index 9b4b8b8ccdf..bd5016d70af 100644 --- a/AUTHORS +++ b/AUTHORS @@ -103,6 +103,7 @@ Javier Romero Jeff Rackauckas Jeff Widman Jenni Rinker +Joan Massich John Eddie Ayson John Towler Jon Sonesen diff --git a/testing/python/raises.py b/testing/python/raises.py index 732e1e82cd1..6738ef9cb3b 100644 --- a/testing/python/raises.py +++ b/testing/python/raises.py @@ -87,6 +87,16 @@ def test_no_raise_message(self): else: assert False, "Expected pytest.raises.Exception" + @pytest.mark.parametrize('example_input,expectation', [ + (3, do_not_raise), + (2, do_not_raise), + (1, do_not_raise), + (0, raises(ZeroDivisionError))]) + def test_do_not_raise(example_input, expectation): + """Test do_not_raise.""" + with expectation: + assert (6 / example_input) is not None + def test_custom_raise_message(self): message = "TEST_MESSAGE" try: