diff --git a/Lib/test/test_capi/test_complex.py b/Lib/test/test_capi/test_complex.py index d731e9308d7ce9..368edfbf2ce97e 100644 --- a/Lib/test/test_capi/test_complex.py +++ b/Lib/test/test_capi/test_complex.py @@ -226,10 +226,11 @@ def test_py_c_pow(self): self.assertEqual(_py_c_pow(0j, -1)[1], errno.EDOM) self.assertEqual(_py_c_pow(0j, 1j)[1], errno.EDOM) - self.assertEqual(_py_c_pow(*[DBL_MAX+1j]*2), - (complex(*[INF]*2), errno.ERANGE)) - self.assertEqual(_py_c_pow(DBL_MAX+1j, 2), - (complex(*[INF]*2), errno.ERANGE)) + max_num = DBL_MAX+1j + self.assertEqual(_py_c_pow(max_num, max_num), + (complex(INF, INF), errno.ERANGE)) + self.assertEqual(_py_c_pow(max_num, 2), + (complex(INF, INF), errno.ERANGE)) def test_py_c_abs(self):