Fix error in approx's repr with complex numbers

Fix #2082
This commit is contained in:
Bruno Oliveira
2016-11-24 15:27:38 -02:00
parent 38f7562c7c
commit 33c0b06fdf
3 changed files with 10 additions and 0 deletions

View File

@@ -1419,6 +1419,9 @@ class ApproxNonIterable(object):
self.rel = rel
def __repr__(self):
if isinstance(self.expected, complex):
return str(self.expected)
# Infinities aren't compared using tolerances, so don't show a
# tolerance.
if math.isinf(self.expected):