summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2019-07-04 05:55:26 -0700
committerAnthony Sottile <asottile@umich.edu>2019-07-04 05:55:26 -0700
commitcaa08ebd4536bbabfb0e1edd3d438be911cfab51 (patch)
treeb51098a9ac2c636f5e037d5b3c7ff6fc50bef2b1 /src
parentb08ae4449b6ab0e70296cc11fc3f1f0ad0e97255 (diff)
downloadpytest-caa08ebd4536bbabfb0e1edd3d438be911cfab51.tar.gz
Improve quoting in raises match failure message
Diffstat (limited to 'src')
-rw-r--r--src/_pytest/_code/code.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/_pytest/_code/code.py b/src/_pytest/_code/code.py
index b0b4d6531..aa4dcffce 100644
--- a/src/_pytest/_code/code.py
+++ b/src/_pytest/_code/code.py
@@ -544,7 +544,7 @@ class ExceptionInfo:
"""
__tracebackhide__ = True
if not re.search(regexp, str(self.value)):
- assert 0, "Pattern '{!s}' not found in '{!s}'".format(regexp, self.value)
+ assert 0, "Pattern {!r} not found in {!r}".format(regexp, str(self.value))
return True