diff --git a/Lib/test/test_cmath.py b/Lib/test/test_cmath.py index a986fd6b892bd2..b736b2b75a3db4 100644 --- a/Lib/test/test_cmath.py +++ b/Lib/test/test_cmath.py @@ -590,6 +590,16 @@ def test_complex_special(self): self.assertIsNotClose(-INF, INF) self.assertIsNotClose(0, INF) self.assertIsNotClose(0, INF*1j) + for z in complex_nans: + for w in complex_infinities + complex_nans: + self.assertIsNotClose(z, w) + + for z in complex_infinities: + for w in complex_infinities: + if z != w: + self.assertIsNotClose(z, w) + else: + self.assertIsClose(z, z) if __name__ == "__main__":