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

gh-63882: Use `self.assert*` in `test_minidom` by StanFromIreland · Pull Request #133000 · python/cpython · GitHub

Repository navigation

gh-63882: Use self.assert* in test_minidom - #133000

Merged
picnixz merged 6 commits into
python:mainfrom
StanFromIreland:minidom-assert
Apr 26, 2025
Merged

picnixz merged 6 commits into
python:mainfrom
StanFromIreland:minidom-assert

Conversation

StanFromIreland commented Apr 26, 2025 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

Replaces all single line asserts, all the old confirms that have multiple lines will be in another pr as the diff is harder to view.

Once raised in #63882 (comment):

In fact, having looked at the test module in a bit more detail, it's in pretty sore need of an overall modernization.

And also a few times in #132879

Request: @picnixz , @hugovk , @zware

bedevere-app Bot added awaiting review tests Tests in the Lib/test dir labels Apr 26, 2025

picnixz 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

When there are assertTrue(not ...), use assertFalse, and when there are assertTrue(x is y), use assertIs. In addition, confirm() may have more than 1 conditions so they should be broken down.

Comment thread Lib/test/test_minidom.py Outdated
Comment thread Lib/test/test_minidom.py Outdated
Comment thread Lib/test/test_minidom.py Outdated
Comment thread Lib/test/test_minidom.py Outdated
Comment thread Lib/test/test_minidom.py Outdated
Comment thread Lib/test/test_minidom.py Outdated
Comment thread Lib/test/test_minidom.py Outdated

bedevere-app Bot commented Apr 26, 2025

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Copy link
Copy Markdown
Member Author

I messed up and re-ran a broken script after, causing some issues. Sent a fixup

StanFromIreland requested a review from picnixz April 26, 2025 11:55
Comment thread Lib/test/test_minidom.py Outdated
Comment thread Lib/test/test_minidom.py Outdated

Copy link
Copy Markdown
Member Author

That should be all now, I hope…

StanFromIreland requested a review from picnixz April 26, 2025 12:09

picnixz 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

Whenever there is "is(X, None)", use assertIsNone. I won't correct more.

Comment thread Lib/test/test_minidom.py Outdated
Comment thread Lib/test/test_minidom.py Outdated
Comment thread Lib/test/test_minidom.py Outdated
Comment thread Lib/test/test_minidom.py Outdated
Comment thread Lib/test/test_minidom.py Outdated
Comment thread Lib/test/test_minidom.py Outdated
Comment thread Lib/test/test_minidom.py Outdated
Comment thread Lib/test/test_minidom.py Outdated
StanFromIreland requested a review from picnixz April 26, 2025 17:47
Comment thread Lib/test/test_minidom.py Outdated
picnixz enabled auto-merge (squash) April 26, 2025 18:00
picnixz merged commit 56c88e4 into python:main Apr 26, 2025
StanFromIreland deleted the minidom-assert branch April 26, 2025 18:44

Copy link
Copy Markdown
Member Author

Thanks :-)

hugovk commented Apr 26, 2025

Copy link
Copy Markdown
Member

And backport?

picnixz commented Apr 26, 2025

Copy link
Copy Markdown
Member

Mmh, yes backports can be done to ease future bps

hugovk added the needs backport to 3.13 only security fixes label Apr 26, 2025

Copy link
Copy Markdown

Thanks @StanFromIreland for the PR, and @picnixz for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 26, 2025
…H-133000)

(cherry picked from commit 56c88e4)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>

bedevere-app Bot commented Apr 26, 2025

Copy link
Copy Markdown

GH-133024 is a backport of this pull request to the 3.13 branch.

bedevere-app Bot removed the needs backport to 3.13 only security fixes label Apr 26, 2025
hugovk pushed a commit that referenced this pull request Apr 26, 2025
) (#133024)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
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.

3 participants


Back | FazBrowse Home | New Git URL