Clearer guidance on pytest.raise(match=...) failure (#7499)
This commit is contained in:
@@ -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*")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user