Clearer guidance on pytest.raise(match=...) failure (#7499)

This commit is contained in:
Lewis Cowles
2020-07-15 20:26:47 +01:00
committed by GitHub
parent 9c2c5d9f05
commit 71ab6236a1
5 changed files with 21 additions and 6 deletions

View File

@@ -423,7 +423,7 @@ def test_match_raises_error(testdir):
result = testdir.runpytest()
assert result.ret != 0
exc_msg = "Pattern '[[]123[]]+' does not match 'division by zero'"
exc_msg = "Regex pattern '[[]123[]]+' does not match 'division by zero'."
result.stdout.fnmatch_lines(["E * AssertionError: {}".format(exc_msg)])
result.stdout.no_fnmatch_line("*__tracebackhide__ = True*")