The result from the pytest_assertrepr_compare hook should not include any newlines since that will confuse the mini-formatting language used by assertion.util.format_explanation. So simply escape the included newlines, this way hook writers do not have to worry about this at all. Fixes issue 453.
5.9 KiB
5.9 KiB