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

@@ -28,6 +28,7 @@ class TestApprox:
print(approx(inf))
print(approx(1.0, rel=nan))
print(approx(1.0, rel=inf))
print(approx(1.0j, rel=inf))
def test_operator_overloading(self):
assert 1 == approx(1, rel=1e-6, abs=1e-12)