[issue27763] Add complex case to test_builtin abs()

Mark Dickinson report at bugs.python.org
Mon Aug 15 07:02:29 EDT 2016


Mark Dickinson added the comment:

> in looking through test_cmath, it appears that only the two numeric
> argument form of complex(i, j) is tested for any of the functions, not the
> complex('i+nj') string form.

We're testing the cmath functions on complex number inputs; I don't think it matters much how those complex numbers are created. The string form of the constructor can't create any complex numbers that the two-argument `complex(x, y)` form can't, so we're not losing test coverage by only using the `complex(x, y)` form.

The complex number creation from both strings and pairs of floats should be tested independently, of course.

----------
nosy: +mark.dickinson

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27763>
_______________________________________


More information about the Python-bugs-list mailing list