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

gh-85989: move HAVE_DOUBLE_ROUNDING check to test.support by skirpichev · Pull Request #150219 · python/cpython · GitHub

Repository navigation

gh-85989: move HAVE_DOUBLE_ROUNDING check to test.support - #150219

Merged
vstinner merged 9 commits into
python:mainfrom
skirpichev:test-support-double-rounding
May 28, 2026
Merged

vstinner merged 9 commits into
python:mainfrom
skirpichev:test-support-double-rounding

Conversation

skirpichev commented May 22, 2026 •
edited
Loading

Copy link
Copy Markdown
Member

This adds skip_if_double_rounding decorator.

skirpichev changed the title gh-85989: add HAVE_DOUBLE_ROUNDING check to test.support gh-85989: move HAVE_DOUBLE_ROUNDING check to test.support May 26, 2026

Copy link
Copy Markdown
Member Author

CC @vstinner

Comment thread Lib/test/support/__init__.py Outdated
skirpichev requested a review from vstinner May 26, 2026 02:36

vstinner 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

LGTM

Comment thread Lib/test/support/__init__.py Outdated

Copy link
Copy Markdown
Member

I merged #150432. It created conflicts. Can you please update your PR to solve conflicts?

Copy link
Copy Markdown
Member Author

I merged #150432. It created conflicts. Can you please update your PR to solve conflicts?

Done.

HAVE_DOUBLE_ROUNDING = (x + y == 1e16 + 4)
skip_if_double_rounding = unittest.skipIf(HAVE_DOUBLE_ROUNDING,
"accuracy not guaranteed on "
"machines with double rounding")

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

Since all tests use @skip_if_double_rounding, I don't think that it's useful to expose HAVE_DOUBLE_ROUNDING variable. I suggest removing unused variables:

del x, y, HAVE_DOUBLE_ROUNDING

vstinner merged commit b6bae53 into python:main May 28, 2026
49 checks passed

Copy link
Copy Markdown
Member

Merged, thanks for the change. It's good to share code between tests.

skirpichev deleted the test-support-double-rounding branch May 28, 2026 11:51
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.

2 participants


Back | FazBrowse Home | New Git URL