GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-102837: more tests for the math module by skirpichev · Pull Request #111930 · python/cpython

Conversation

@skirpichev

@skirpichev skirpichev commented Nov 10, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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

  • Issue: Improve test coverage for the math module #102837

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@skirpichev
pythongh-102837: more tests for the math module
459dee2
* 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
@bedevere-app bedevere-app Bot added the awaiting review label Nov 10, 2023
@bedevere-app bedevere-app Bot mentioned this pull request Nov 10, 2023
Improve test coverage for the math module #102837
Closed
@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Nov 10, 2023
@skirpichev skirpichev mentioned this pull request Nov 10, 2023
gh-102837: Increase test coverage for the math module #110000
Closed
@skirpichev

skirpichev commented Nov 10, 2023

Copy link
Copy Markdown
Member Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@skirpichev

This comment was marked as resolved.

Sign in to view
@AlexWaygood AlexWaygood added the skip news label Nov 10, 2023
encukou
encukou approved these changes Nov 13, 2023
View reviewed changes

@encukou encukou left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

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 :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Nov 13, 2023
@encukou 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
encukou merged commit c61de45 into python:main Nov 13, 2023
@miss-islington-app

miss-islington-app Bot commented 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.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented Nov 13, 2023

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
encukou reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app miss-islington-app Bot assigned encukou Nov 13, 2023
@miss-islington-app

miss-islington-app Bot commented Nov 13, 2023

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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@skirpichev
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
@skirpichev
[3.12] pythongh-102837: more tests for the math module (pythonGH-111930)
fc30aed
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 <[email protected]>
encukou pushed a commit to encukou/cpython that referenced this pull request Nov 13, 2023
@skirpichev @encukou
pythongh-102837: more tests for the math module (pythonGH-111930)
3650c8d
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

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app 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
@skirpichev @encukou
pythongh-102837: more tests for the math module (pythonGH-111930)
b549dc5
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
@encukou @skirpichev
[3.12] gh-102837: more tests for the math module (GH-111930)(GH-102523)…
c6aea46
… (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 <[email protected]>
@encukou encukou mentioned this pull request Nov 13, 2023
[3.11] gh-102837: more tests for the math module (GH-111930)(GH-102523) (GH-112030) #112041
Merged
encukou added a commit that referenced this pull request Nov 16, 2023
@encukou @skirpichev
[3.11] gh-102837: more tests for the math module (GH-111930)(GH-102523)…
132a749
… (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 <[email protected]>
(cherry picked from commit c6aea46)
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
@skirpichev @aisk
pythongh-102837: more tests for the math module (pythonGH-111930)
6ee62a5
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
@skirpichev @Glyphack
pythongh-102837: more tests for the math module (pythonGH-111930)
91e7113
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 hugovk removed the needs backport to 3.11 only security fixes label Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@encukou encukou encukou approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@encukou encukou

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@skirpichev @encukou @hugovk @AlexWaygood
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.