From 098dca3a9fda8dd6ed999e5e38d36877191690b5 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 31 Jul 2018 21:14:51 -0300 Subject: [PATCH] Use {!r} for a few other messages as well --- src/_pytest/python_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_pytest/python_api.py b/src/_pytest/python_api.py index 88e41bab5..f51d44fe1 100644 --- a/src/_pytest/python_api.py +++ b/src/_pytest/python_api.py @@ -173,7 +173,7 @@ class ApproxMapping(ApproxBase): for x in self.expected.values(): if isinstance(x, type(self.expected)): 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 ) ) @@ -207,7 +207,7 @@ class ApproxSequence(ApproxBase): for x in self.expected: if isinstance(x, type(self.expected)): 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 ) )