Skip to content

Conversation

sleepyStick
Copy link
Contributor

(grouped them together because there wasn't a lot of each, but i can seperate the two into two different PRs if that's preferred)

self.assertTrue(x is y) -> self.assertIs(x, y)
self.assertTrue(x is not None) -> self.assertIsNotNone(x)

@sleepyStick sleepyStick marked this pull request as ready for review August 22, 2025 19:03
@sleepyStick sleepyStick requested a review from a team as a code owner August 22, 2025 19:03
Copy link
Contributor

@aclark4life aclark4life left a comment

Choose a reason for hiding this comment

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

LGTM! The only minor issue (nit, even) I notice is that "better" is subjective and what's actually changing is the assertions, from general (True/False) to specific (Is/IsNot) and that is objectively better 😂

@aclark4life aclark4life changed the title PYTHON-5514 Better assertions for "is" and "is not None" PYTHON-5514 Specific assertions for "is" and "is not None" Aug 25, 2025
@sleepyStick
Copy link
Contributor Author

LGTM! The only minor issue (nit, even) I notice is that "better" is subjective and what's actually changing is the assertions, from general (True/False) to specific (Is/IsNot) and that is objectively better 😂

Good point! thanks for the name change!

@sleepyStick sleepyStick merged commit 3ebd934 into mongodb:master Aug 25, 2025
79 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants