Skip to content
Draft
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
  • Loading branch information
skirpichev and picnixz authored Aug 19, 2024
commit 389441d99eff56d03efa13b969edc7e25429fb89
6 changes: 3 additions & 3 deletions Lib/test/test_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,11 @@ def test_pow_with_small_integer_exponents(self):
r_pro, r_pro_errno = _testcapi._py_c_pow(z, e)
self.assertEqual(r_pro_errno, 0)
self.assertClose(r_pow, r_pro)
if not isnan(r_pow.real):
if isnan(r_pow.real):
self.assertTrue(isnan(r_pro.real))
else:
self.assertEqual(copysign(1, r_pow.real),
copysign(1, r_pro.real))
else:
self.assertTrue(isnan(r_pro.real))
if not isnan(r_pow.imag):
self.assertEqual(copysign(1, r_pow.imag),
copysign(1, r_pro.imag))
Expand Down