From 5003bae0de4e1dc3ded16950c24c2aad275c78a4 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Wed, 1 Aug 2018 07:07:37 -0300 Subject: [PATCH] Fix 'at' string for non-numeric messages in approx() --- 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 529c64222..bbbc144ee 100644 --- a/src/_pytest/python_api.py +++ b/src/_pytest/python_api.py @@ -34,9 +34,9 @@ def _cmp_raises_type_error(self, other): def _non_numeric_type_error(value, at): - at_str = "at {}".format(at) if at else "" + at_str = " at {}".format(at) if at else "" return TypeError( - "cannot make approximate comparisons to non-numeric values: {!r} ".format( + "cannot make approximate comparisons to non-numeric values: {!r} {}".format( value, at_str ) )