Skip to content

Conversation

@StanFromIreland
Copy link
Member

@StanFromIrelandStanFromIreland commented Apr 26, 2025

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

Copy link
Member

@picnixzpicnixz left a comment

Choose a reason for hiding this comment

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

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.

@bedevere-app
Copy link

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.

@StanFromIreland
Copy link
MemberAuthor

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

@StanFromIreland
Copy link
MemberAuthor

That should be all now, I hope…

Copy link
Member

@picnixzpicnixz left a comment

Choose a reason for hiding this comment

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

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

@picnixzpicnixz enabled auto-merge (squash) April 26, 2025 18:00
@picnixzpicnixz merged commit 56c88e4 into python:mainApr 26, 2025
38 checks passed
@StanFromIrelandStanFromIreland deleted the minidom-assert branch April 26, 2025 18:44
@StanFromIreland
Copy link
MemberAuthor

Thanks :-)

@hugovk
Copy link
Member

And backport?

@picnixz
Copy link
Member

Mmh, yes backports can be done to ease future bps

@hugovkhugovk added the needs backport to 3.13 bugs and security fixes label Apr 26, 2025
@miss-islington-app
Copy link

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
Copy link

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

@bedevere-appbedevere-appbot removed the needs backport to 3.13 bugs and 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>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip newstestsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@StanFromIreland@hugovk@picnixz