Fix sys.version_info errors.
This commit is contained in:
parent
6a902924f8
commit
7d155bd3cf
|
@ -1417,7 +1417,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
|
||||
utf_8 = lambda s: s.encode('utf-8') if sys.version_info[0] == 2 else s
|
||||
plus_minus = lambda x: utf_8(u'{0} \u00b1 {1:.1e}'.format(x, self._get_margin(x)))
|
||||
|
||||
if isinstance(self.expected, Iterable):
|
||||
|
|
Loading…
Reference in New Issue