-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
PYTHON-4651: Migrate test_client_context.py to async #1819
Conversation
209cc3d
to
61e2eef
Compare
I think the failing tests are all related to PYTHON-4701 |
Strange the rhel8-pr-assign-reviewer task ran but didn't assign a reviewer. |
Oh i assumed it was cuz the tests/checks weren't passing? Because it won't let me assign / add reviews either..? |
class TestAsyncClientContext(AsyncUnitTest): | ||
@classmethod | ||
async def _setup_class(cls): | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove _setup_class since it's just a pass
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AsyncUnitTest
assumes that _setup_class
would be implemented..without this the code would infinitely recurse and eventually error.
To my knowledge this is the first time that a class inherits from AsyncUnitTest
that doesn't "need" a _setup_class
. I don't know if we want to change AsyncUnitTest
to accommodate this class's use case or not...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AsyncUnitTest methods should pass
instead of trying to recursively call itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That work's too, don't know why i didn't think of that earlier! Just changed :)
That's intentional in draft mode |
But the PR was moved out of draft mode. Shouldn't the reviewer be auto-assigned in that case? |
Not unless the EVG task is re-run. |
Oh TIL. I thought it worked the other way. |
Not until we can have other GitHub events trigger EVG runs, or we make our own service listener with a webhook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! The async test_client_context.py
should also be run here as part of the test_sdist
PR hook.
.github/workflows/test-python.yml
Outdated
@@ -209,4 +209,4 @@ jobs: | |||
ls | |||
which python | |||
pip install -e ".[test]" | |||
PYMONGO_MUST_CONNECT=1 pytest -v test/test_client_context.py | |||
PYMONGO_MUST_CONNECT=1 pytest -k client_context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PYMONGO_MUST_CONNECT=1 pytest -k client_context | |
PYMONGO_MUST_CONNECT=1 pytest -v -k client_context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency across our test runs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that something we can set in pyproject?
No description provided.