Skip to content

PYTHON-5386 Better test assertions for isinstance #2347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 22, 2025

Conversation

sleepyStick
Copy link
Contributor

@sleepyStick sleepyStick commented May 21, 2025

Oops accidentally had the wrong ticket number...(only realized after i had created a draft PR >.<)
But this just changes assertions for isinstance calls:
self.assertTrue(isinstance(..., ...)) -> self.assertIsInstance(..., ...)
self.assertFalse(isinstance(..., ...)) -> self.assertNotIsInstance(..., ...)

Copy link

There is an existing patch(es) for this commit SHA:

Please note that the status that is posted is not in the context of this PR but rather the (latest) existing patch and that may affect some tests that may depend on the particular PR. If your tests do not rely on any PR-specific values (like base or head branch name) then your tests will report the same status. If you would like a patch to run in the context of this PR and abort the other(s), comment 'evergreen retry'.

@sleepyStick sleepyStick changed the title PYTHON-5292 Better test assertions for isinstance PYTHON-5262 Better test assertions for isinstance May 21, 2025
@sleepyStick sleepyStick marked this pull request as ready for review May 22, 2025 17:10
@NoahStapp
Copy link
Contributor

Can you make a sub-task on the JIRA ticket for this work? Tracking each assertion type improvement separately would be helpful.

@sleepyStick sleepyStick changed the title PYTHON-5262 Better test assertions for isinstance PYTHON-5286 Better test assertions for isinstance May 22, 2025
@sleepyStick
Copy link
Contributor Author

sleepyStick commented May 22, 2025

Can you make a sub-task on the JIRA ticket for this work? Tracking each assertion type improvement separately would be helpful.

yes, good call, done! Just renamed the PR name to use the new ticket / subtask number.

Copy link
Contributor

@NoahStapp NoahStapp left a comment

Choose a reason for hiding this comment

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

Great work! Please update the ticket in the title to the correct PYTHON-5386 before merging.

@sleepyStick sleepyStick changed the title PYTHON-5286 Better test assertions for isinstance PYTHON-5386 Better test assertions for isinstance May 22, 2025
@sleepyStick sleepyStick merged commit 65089ea into mongodb:master May 22, 2025
79 checks passed
@sleepyStick sleepyStick deleted the PYTHON-5262 branch May 22, 2025 23:15
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