Feature or enhancement
Proposal:
In Lib/test/test_cmath.py , under the test_isinf() method , many test cases for isinf method are available but edge cases like -inf and inf/inf seems to be missing.
def test_isinf(self):
self.assertFalse(cmath.isinf(1))
self.assertFalse(cmath.isinf(1j))
self.assertFalse(cmath.isinf(NAN))
self.assertTrue(cmath.isinf(INF))
self.assertTrue(cmath.isinf(complex(INF, 0)))
self.assertTrue(cmath.isinf(complex(0, INF)))
self.assertTrue(cmath.isinf(complex(INF, INF)))
self.assertTrue(cmath.isinf(complex(NAN, INF)))
self.assertTrue(cmath.isinf(complex(INF, NAN)))
I have opened a PR adding 2 test cases for -inf and inf/inf
Has this already been discussed elsewhere?
No
Links to previous discussion of this feature:
Linked PRs
Feature or enhancement
Proposal:
In Lib/test/test_cmath.py , under the test_isinf() method , many test cases for isinf method are available but edge cases like
-infandinf/infseems to be missing.I have opened a PR adding 2 test cases for
-infandinf/infHas this already been discussed elsewhere?
No
Links to previous discussion of this feature:
Linked PRs
cmath.isinf#148869