◐ Shell
clean mode source ↗

[3.12] gh-109218: Refactor tests for the complex() constructor (GH-119635) by miss-islington · Pull Request #119796 · python/cpython

…GH-119635)

* Share common classes.
* Use exactly representable floats and exact tests.
* Check the sign of zero components.
* Remove duplicated tests (mostly left after merging int and long).
* Reorder tests in more consistent way.
* Test more error messages.
* Add tests for missed cases.
(cherry picked from commit bf098d4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>