FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-102837: more tests for the math module by skirpichev · Pull Request #111930 · python/cpython · GitHub

/ cpython Public

gh-102837: more tests for the math module - #111930

Merged
encukou merged 1 commit into
python:mainfrom
skirpichev:math-cov-tests
Nov 13, 2023
Merged

gh-102837: more tests for the math module#111930
encukou merged 1 commit into
python:mainfrom
skirpichev:math-cov-tests

Conversation

skirpichev commented Nov 10, 2023
edited
Loading

Copy link
Copy Markdown
Member
  • fsum: L1369, L1379, L1383, L1412
  • trunc: L2081
  • log: L2267
  • dist: L2577, L2579
  • hypot: L2632
  • sumprod: L2744, L2754, L2774, L2778, L2781, L2785, L2831, L2835, L2838
  • pow: L2982
  • prod: L3294, L3308, L3318-3330

// line numbers wrt to 9dc4fb8


https://github.com/python/cpython/blob/9dc4fb820439db26b223edce30e5313a2e3182ff/Modules/mathmodule.c

* fsum: L1369, L1379, L1383, L1412
* trunc: L2081
* log: L2267
* dist: L2577, L2579
* hypot: L2632
* sumprod: L2744, L2754, L2774, L2778, L2781, L2785, L2831, L2835, L2838
* pow: L2982
* prod: L3294, L3308, L3318-3330

// line numbers wrt to 9dc4fb8

Copy link
Copy Markdown
Member Author

That pr includes only test additions from #110000, per suggestion of one reviewer.

This comment was marked as resolved.

encukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thank you. This is an easy review -- it adds passing tests. I'll trust you that the test cases are relevant -- if they're not, no big deal.
Hopefully it'll also be easy to backport, but if the tests fail in previous versions, that's something to look into.
And it'll hopefully help focus the original PR, making it easier for math experts to review :)

encukou added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes and removed awaiting merge labels Nov 13, 2023
encukou merged commit c61de45 into python:main Nov 13, 2023

Copy link
Copy Markdown

Thanks @skirpichev for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

Copy link
Copy Markdown

Sorry, @skirpichev and @encukou, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker c61de456db0186b65d479d41e84127832205d30d 3.12

Copy link
Copy Markdown

Sorry, @skirpichev and @encukou, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker c61de456db0186b65d479d41e84127832205d30d 3.11

skirpichev deleted the math-cov-tests branch November 13, 2023 10:58
skirpichev added a commit to skirpichev/cpython that referenced this pull request Nov 13, 2023
Add tests to improve coverage:

* fsum: L1369, L1379, L1383, L1412
* trunc: L2081
* log: L2267
* dist: L2577, L2579
* hypot: L2632
* sumprod: L2744, L2754, L2774, L2778, L2781, L2785, L2831, L2835, L2838
* pow: L2982
* prod: L3294, L3308, L3318-3330

// line numbers wrt to 9dc4fb8
(cherry picked from commit c61de45)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
encukou pushed a commit to encukou/cpython that referenced this pull request Nov 13, 2023
Add tests to improve coverage:

* fsum: L1369, L1379, L1383, L1412
* trunc: L2081
* log: L2267
* dist: L2577, L2579
* hypot: L2632
* sumprod: L2744, L2754, L2774, L2778, L2781, L2785, L2831, L2835, L2838
* pow: L2982
* prod: L3294, L3308, L3318-3330

// line numbers wrt to 9dc4fb8

(cherry picked from commit c61de45)

bedevere-app Bot commented Nov 13, 2023

Copy link
Copy Markdown

GH-112029 is a backport of this pull request to the 3.12 branch.

bedevere-app Bot removed the needs backport to 3.12 only security fixes label Nov 13, 2023
encukou pushed a commit to encukou/cpython that referenced this pull request Nov 13, 2023
Add tests to improve coverage:

* fsum: L1369, L1379, L1383, L1412
* trunc: L2081
* log: L2267
* dist: L2577, L2579
* hypot: L2632
* sumprod: L2744, L2754, L2774, L2778, L2781, L2785, L2831, L2835, L2838
* pow: L2982
* prod: L3294, L3308, L3318-3330

// line numbers wrt to 9dc4fb8

(cherry picked from commit c61de45)
encukou added a commit that referenced this pull request Nov 13, 2023
… (GH-112030)

* gh-102837: improve test coverage for math module (GH-102523)

(Only the test changes from GH-102523 are cherry-picked)

- input checks for math_1(L989), math_1a(L1023), math_2(L1064,L1071), hypot(L2682), log(L2307), ldexp(L2168), ceil(L1165), floor(L1236,L1239) and dist(L2587,L2588,L2628).
- improve fsum coverage for exceptional cases (L1433,L1438,L1451,L1497), ditto fmod(L2378)

(all line numbers are wrt the main branch at 5e6661b)

* gh-102837: more tests for the math module (GH-111930)

Add tests to improve coverage:

* fsum: L1369, L1379, L1383, L1412
* trunc: L2081
* log: L2267
* dist: L2577, L2579
* hypot: L2632
* sumprod: L2744, L2754, L2774, L2778, L2781, L2785, L2831, L2835, L2838
* pow: L2982
* prod: L3294, L3308, L3318-3330

// line numbers wrt to 9dc4fb8

(cherry picked from commit c61de45)

---------

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
encukou added a commit that referenced this pull request Nov 16, 2023
… (GH-112030) (GH-112041)

[3.12] gh-102837: more tests for the math module (GH-111930)(GH-102523) (GH-112030)

* gh-102837: improve test coverage for math module (GH-102523)

(Only the test changes from GH-102523 are cherry-picked)

- input checks for math_1(L989), math_1a(L1023), math_2(L1064,L1071), hypot(L2682), log(L2307), ldexp(L2168), ceil(L1165), floor(L1236,L1239) and dist(L2587,L2588,L2628).
- improve fsum coverage for exceptional cases (L1433,L1438,L1451,L1497), ditto fmod(L2378)

(all line numbers are wrt the main branch at 5e6661b)

* gh-102837: more tests for the math module (GH-111930)

Add tests to improve coverage:

* fsum: L1369, L1379, L1383, L1412
* trunc: L2081
* log: L2267
* dist: L2577, L2579
* hypot: L2632
* (not cherry-picked for 3.11: sumprod)
* pow: L2982
* prod: L3294, L3308, L3318-3330

// line numbers wrt to 9dc4fb8

(cherry picked from commit c61de45)

---------

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
(cherry picked from commit c6aea46)
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Add tests to improve coverage:

* fsum: L1369, L1379, L1383, L1412
* trunc: L2081
* log: L2267
* dist: L2577, L2579
* hypot: L2632
* sumprod: L2744, L2754, L2774, L2778, L2781, L2785, L2831, L2835, L2838
* pow: L2982
* prod: L3294, L3308, L3318-3330

// line numbers wrt to 9dc4fb8
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Add tests to improve coverage:

* fsum: L1369, L1379, L1383, L1412
* trunc: L2081
* log: L2267
* dist: L2577, L2579
* hypot: L2632
* sumprod: L2744, L2754, L2774, L2778, L2781, L2785, L2831, L2835, L2838
* pow: L2982
* prod: L3294, L3308, L3318-3330

// line numbers wrt to 9dc4fb8
hugovk removed the needs backport to 3.11 only security fixes label Feb 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL