Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More tests for complexobject.c #109802

Closed
skirpichev opened this issue Sep 24, 2023 · 0 comments
Closed

More tests for complexobject.c #109802

skirpichev opened this issue Sep 24, 2023 · 0 comments
Labels
tests Tests in the Lib/test dir type-feature A feature request or enhancement

Comments

@skirpichev
Copy link
Member

skirpichev commented Sep 24, 2023

Right now ./python -m test test_complex test_cmath only partially cover implementation of the complex object. Some code/branches are just inaccessible (e.g. L135-136 or mask <= 0 on L166; line numbers are wrt to 54fbfa8). There are only indirect tests for C-API functions (e.g. PyComplex_RealAsDouble, PyComplex_ImagAsDouble).

Linked PRs

@skirpichev skirpichev added the type-feature A feature request or enhancement label Sep 24, 2023
skirpichev added a commit to skirpichev/cpython that referenced this issue Sep 24, 2023
* _Py_c_pow: L134 (this case goes to c_powi() due to L523), L139

// line numbers wrt to 54fbfa8
@AlexWaygood AlexWaygood added the tests Tests in the Lib/test dir label Sep 24, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Nov 28, 2023
…-112452)

(cherry picked from commit f14d741)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
serhiy-storchaka pushed a commit that referenced this issue Nov 28, 2023
…) (GH-112489)

(cherry picked from commit f14d741)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
skirpichev added a commit to skirpichev/cpython that referenced this issue Apr 2, 2024
This tests overflow on L594.

// line numbers wrt to 0f2fa61
encukou pushed a commit that referenced this issue Apr 4, 2024
* gh-109802: Add coverage test for complex_abs()

This tests overflow on L594.

// line numbers wrt to 0f2fa61
diegorusso pushed a commit to diegorusso/cpython that referenced this issue Apr 17, 2024
* pythongh-109802: Add coverage test for complex_abs()

This tests overflow on L594.

// line numbers wrt to 0f2fa61
@skirpichev skirpichev closed this as not planned Won't fix, can't repro, duplicate, stale Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants
@skirpichev @AlexWaygood and others