From c9c73b8d8e8e985864569d93e012145c870c0929 Mon Sep 17 00:00:00 2001 From: Kale Kundert Date: Mon, 7 Mar 2016 19:54:43 -0800 Subject: [PATCH] Fix zero-length field name error in python2.6 --- _pytest/python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_pytest/python.py b/_pytest/python.py index 86b5bd4a3..1a3582d60 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -1418,7 +1418,7 @@ class approx(object): def __repr__(self): from collections import Iterable utf_8 = lambda s: s.encode('utf-8') if sys.version_info.major == 2 else s - plus_minus = lambda x: utf_8(u'{} \u00b1 {:.1e}'.format(x, self._get_margin(x))) + plus_minus = lambda x: utf_8(u'{0} \u00b1 {1:.1e}'.format(x, self._get_margin(x))) if isinstance(self.expected, Iterable): return ', '.join([plus_minus(x) for x in self.expected])