Skip to content
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-5055 - Convert test_client.py to unittest #2074

Open
wants to merge 26 commits into
base: master
Choose a base branch
from

Conversation

NoahStapp
Copy link
Contributor

@NoahStapp NoahStapp commented Jan 23, 2025

Main points of note:

  1. All stateful unittest methods have been converted to pytest fixtures.
  2. Every async test and fixture runs on the same loop that exists for the entire test session. This is separate from the pytest caching scope for fixtures, which is controlled by scope instead of loop_scope.
  3. ClientContext has been kept as a metadata store for our tests served by a session-scoped fixture.
  4. unit and integration pytest marks have been added. Going forward, all test classes should be marked with the appropriate one.

@NoahStapp NoahStapp closed this Jan 24, 2025
@NoahStapp NoahStapp reopened this Jan 24, 2025
@blink1073
Copy link
Member

evergreen retry

Copy link
Contributor

@sleepyStick sleepyStick left a comment

Choose a reason for hiding this comment

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

I think the Python changes look good to me. (I found things that I needed to change on my PR / test conversions as a result of reviewing this so that was helpful haha)

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.

3 participants