Use {!r} for a few other messages as well
This commit is contained in:
parent
8e2ed76227
commit
098dca3a9f
|
@ -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
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue