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

GH-102341: Improve the test function for pow by ppmfloss · Pull Request #102342 · python/cpython · GitHub

/ cpython Public

GH-102341: Improve the test function for pow - #102342

Merged
terryjreedy merged 7 commits into
python:mainfrom
ppmfloss:fix-pow-test
Mar 5, 2023
Merged

GH-102341: Improve the test function for pow#102342
terryjreedy merged 7 commits into
python:mainfrom
ppmfloss:fix-pow-test

Conversation

ppmfloss commented Feb 28, 2023
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Contributor

Currently in the powtest function in Lib/test/test_pow.py file we are not testing the results of calling pow with negative exponents.
This PR will add appropriate assert statements to test the results of calling pow with negative exponents.

bedevere-bot added the tests Tests in the Lib/test dir label Feb 28, 2023
terryjreedy added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Feb 28, 2023

Copy link
Copy Markdown
Member

Mark and Raymond, a one-line addition to test_pow that looks plausible but I am not sure.

Pipelines win32 failure is unrelated of type seen before.

rhettinger removed their request for review March 1, 2023 02:36

Copy link
Copy Markdown
Member

Thanks for the ping, @terryjreedy. I'll take a look this weekend.

mdickinson self-assigned this Mar 1, 2023

mdickinson left a comment
edited
Loading

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. Can we drop the for othertype in (int,): outer loop while we're here? (I'm guessing that it stems from Python 2 days, and was originally spelled for othertype in (int, long):.)

Comment thread Lib/test/test_pow.py Outdated
Comment thread Lib/test/test_pow.py Outdated
Comment thread Lib/test/test_pow.py Outdated
python deleted a comment from bedevere-bot Mar 4, 2023

Copy link
Copy Markdown
Member

Please recheck after deletion, dedent, and condensation.

ppmfloss commented Mar 4, 2023

Copy link
Copy Markdown
Contributor Author

I have removed some indentation spaces and retested it locally successfully.

mdickinson 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!

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown

GH-102446 is a backport of this pull request to the 3.11 branch.

bedevere-bot removed the needs backport to 3.11 only security fixes label Mar 5, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 5, 2023
(cherry picked from commit 3222054)

Co-authored-by: Partha P. Mukherjee <ppm.floss@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>

Copy link
Copy Markdown

GH-102447 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 5, 2023
(cherry picked from commit 3222054)

Co-authored-by: Partha P. Mukherjee <ppm.floss@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
bedevere-bot removed the needs backport to 3.10 only security fixes label Mar 5, 2023
miss-islington added a commit that referenced this pull request Mar 5, 2023
(cherry picked from commit 3222054)

Co-authored-by: Partha P. Mukherjee <ppm.floss@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
miss-islington added a commit that referenced this pull request Mar 5, 2023
(cherry picked from commit 3222054)

Co-authored-by: Partha P. Mukherjee <ppm.floss@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
hugovk pushed a commit to hugovk/cpython that referenced this pull request Mar 6, 2023
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
carljm added a commit to carljm/cpython that referenced this pull request Mar 6, 2023
* main: (21 commits)
  pythongh-102192: Replace PyErr_Fetch/Restore etc by more efficient alternatives in sub interpreters module (python#102472)
  pythongh-95672: Fix versionadded indentation of get_pagesize in test.rst (pythongh-102455)
  pythongh-102416: Do not memoize incorrectly loop rules in the parser (python#102467)
  pythonGH-101362: Optimise PurePath(PurePath(...)) (pythonGH-101667)
  pythonGH-101362: Check pathlib.Path flavour compatibility at import time (pythonGH-101664)
  pythonGH-101362: Call join() only when >1 argument supplied to pathlib.PurePath() (python#101665)
  pythongh-102444: Fix minor bugs in `test_typing` highlighted by pyflakes (python#102445)
  pythonGH-102341: Improve the test function for pow (python#102342)
  Fix unused classes in a typing test (pythonGH-102437)
  pythongh-101979: argparse: fix a bug where parentheses in metavar argument of add_argument() were dropped (python#102318)
  pythongh-102356: Add thrashcan macros to filter object dealloc (python#102426)
  Move around example in to_bytes() to avoid confusion (python#101595)
  pythonGH-97546: fix flaky asyncio `test_wait_for_race_condition` test (python#102421)
  pythongh-96821: Add config option `--with-strict-overflow` (python#96823)
  pythongh-101992: update pstlib module documentation (python#102133)
  pythongh-63301: Set exit code when tabnanny CLI exits on error (python#7699)
  pythongh-101863: Fix wrong comments in EUC-KR codec (pythongh-102417)
  pythongh-102302 Micro-optimize `inspect.Parameter.__hash__` (python#102303)
  pythongh-102179: Fix `os.dup2` error reporting for negative fds (python#102180)
  pythongh-101892: Fix `SystemError` when a callable iterator call exhausts the iterator (python#101896)
  ...
carljm added a commit to carljm/cpython that referenced this pull request Mar 7, 2023
* main: (37 commits)
  pythongh-102192: Replace PyErr_Fetch/Restore etc by more efficient alternatives in sub interpreters module (python#102472)
  pythongh-95672: Fix versionadded indentation of get_pagesize in test.rst (pythongh-102455)
  pythongh-102416: Do not memoize incorrectly loop rules in the parser (python#102467)
  pythonGH-101362: Optimise PurePath(PurePath(...)) (pythonGH-101667)
  pythonGH-101362: Check pathlib.Path flavour compatibility at import time (pythonGH-101664)
  pythonGH-101362: Call join() only when >1 argument supplied to pathlib.PurePath() (python#101665)
  pythongh-102444: Fix minor bugs in `test_typing` highlighted by pyflakes (python#102445)
  pythonGH-102341: Improve the test function for pow (python#102342)
  Fix unused classes in a typing test (pythonGH-102437)
  pythongh-101979: argparse: fix a bug where parentheses in metavar argument of add_argument() were dropped (python#102318)
  pythongh-102356: Add thrashcan macros to filter object dealloc (python#102426)
  Move around example in to_bytes() to avoid confusion (python#101595)
  pythonGH-97546: fix flaky asyncio `test_wait_for_race_condition` test (python#102421)
  pythongh-96821: Add config option `--with-strict-overflow` (python#96823)
  pythongh-101992: update pstlib module documentation (python#102133)
  pythongh-63301: Set exit code when tabnanny CLI exits on error (python#7699)
  pythongh-101863: Fix wrong comments in EUC-KR codec (pythongh-102417)
  pythongh-102302 Micro-optimize `inspect.Parameter.__hash__` (python#102303)
  pythongh-102179: Fix `os.dup2` error reporting for negative fds (python#102180)
  pythongh-101892: Fix `SystemError` when a callable iterator call exhausts the iterator (python#101896)
  ...
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.

6 participants


Back | FazBrowse Home | New Git URL