]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-109218: Refactor tests for the complex() constructor (GH-119635) (GH-119796)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 30 May 2024 18:05:38 +0000 (20:05 +0200)
committerGitHub <noreply@github.com>
Thu, 30 May 2024 18:05:38 +0000 (18:05 +0000)
commit2e31e5695d9c58cab4569a53cf097badd1141a5b
tree3a68873ac0577e3f780e5a2c9b450b52e9c512a9
parent863da7291c9f912aa951955e2bf06b9965accd75
[3.12] gh-109218: Refactor tests for the complex() constructor (GH-119635) (GH-119796)

* 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 bf098d4157158e1e4b2ea78aba4ac82d72e24cff)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_complex.py