Skip to content

Commit c1d0a00

Browse files
Aniketsyskirpichev
andauthored
Update Lib/test/test_cmath.py
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
1 parent deb883e commit c1d0a00

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Lib/test/test_cmath.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -602,11 +602,12 @@ def test_complex_special(self):
602602

603603
inf_complex = [c for c in special_complex
604604
if not math.isnan(c.real) and not math.isnan(c.imag)]
605-
for z, w in itertools.combinations(inf_complex, 2):
606-
self.assertIsNotClose(z, w)
607-
608605
for z in inf_complex:
609-
self.assertIsClose(z, z)
606+
for w in inf_complex:
607+
if z != w:
608+
self.assertIsNotClose(z, w)
609+
else:
610+
self.assertIsClose(z, z)
610611

611612

612613
if __name__ == "__main__":

0 commit comments

Comments
 (0)