diff --git a/Lib/test/test_cmath.py b/Lib/test/test_cmath.py index a986fd6b892bd2..2de701f5fecc12 100644 --- a/Lib/test/test_cmath.py +++ b/Lib/test/test_cmath.py @@ -584,6 +584,10 @@ def test_complex_near_zero(self): self.assertIsNotClose(0.001-0.001j, 0.001+0.001j, abs_tol=1e-03) def test_complex_special(self): + self.assertIsClose(complex(INF, INF), complex(INF, INF)) + self.assertIsClose(complex(-INF, -INF), complex(-INF, -INF)) + self.assertIsNotClose(complex(NAN, NAN), complex(NAN, NAN)) + self.assertIsNotClose(complex(INF, INF), complex(-INF, -INF)) self.assertIsNotClose(INF, INF*1j) self.assertIsNotClose(INF*1j, INF) self.assertIsNotClose(INF, -INF)