We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1fbb2a commit 62a47d1Copy full SHA for 62a47d1
testing/python/raises.py
@@ -87,6 +87,16 @@ def test_no_raise_message(self):
87
else:
88
assert False, "Expected pytest.raises.Exception"
89
90
+ @pytest.mark.parametrize('example_input,expectation', [
91
+ (3, do_not_raise),
92
+ (2, do_not_raise),
93
+ (1, do_not_raise),
94
+ (0, raises(ZeroDivisionError))])
95
+ def test_do_not_raise(example_input, expectation):
96
+ """Test do_not_raise."""
97
+ with expectation:
98
+ assert (6 / example_input) is not None
99
+
100
def test_custom_raise_message(self):
101
message = "TEST_MESSAGE"
102
try:
0 commit comments