Use {!r} for a few other messages as well

This commit is contained in:
Bruno Oliveira 2018-07-31 21:14:51 -03:00
parent 8e2ed76227
commit 098dca3a9f
1 changed files with 2 additions and 2 deletions

View File

@ -173,7 +173,7 @@ class ApproxMapping(ApproxBase):
for x in self.expected.values(): for x in self.expected.values():
if isinstance(x, type(self.expected)): if isinstance(x, type(self.expected)):
raise TypeError( raise TypeError(
"pytest.approx() does not support nested dictionaries, e.g. {}".format( "pytest.approx() does not support nested dictionaries, e.g. {!r}".format(
self.expected self.expected
) )
) )
@ -207,7 +207,7 @@ class ApproxSequence(ApproxBase):
for x in self.expected: for x in self.expected:
if isinstance(x, type(self.expected)): if isinstance(x, type(self.expected)):
raise TypeError( raise TypeError(
"pytest.approx() does not support nested data structures, e.g. {}".format( "pytest.approx() does not support nested data structures, e.g. {!r}".format(
self.expected self.expected
) )
) )