From 2ae6fb6e08b86644c3f9ba0b5e03ec6b68bb6b34 Mon Sep 17 00:00:00 2001 From: manoj Date: Sat, 16 May 2026 19:42:31 +0530 Subject: [PATCH] Increase test coverage for isclose() with complex numbers --- Lib/test/test_cmath.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/test/test_cmath.py b/Lib/test/test_cmath.py index a986fd6b892bd2..46a9e0c1feb470 100644 --- a/Lib/test/test_cmath.py +++ b/Lib/test/test_cmath.py @@ -584,6 +584,9 @@ 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(INF, INF*1j) self.assertIsNotClose(INF*1j, INF) self.assertIsNotClose(INF, -INF)