We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59e001b commit 1639c81Copy full SHA for 1639c81
hypothesis-python/tests/common/utils.py
@@ -178,11 +178,14 @@ def assert_falsifying_output(
178
if expected_exception is None:
179
# Some tests want to check the output of non-failing runs.
180
test()
181
+ msg = ""
182
else:
- with raises(expected_exception):
183
+ with raises(expected_exception) as exc_info:
184
185
+ notes = "\n".join(getattr(exc_info.value, "__notes__", []))
186
+ msg = str(exc_info.value) + "\n" + notes
187
- output = out.getvalue()
188
+ output = out.getvalue() + msg
189
assert f"{example_type} example:" in output
190
assert_output_contains_failure(output, test, **kwargs)
191
0 commit comments