-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-5382 - Add a test with min dependencies #2410
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
Changes from 11 commits
e84fb43
88c0be9
e7a8ce3
2bae838
05d0398
0fab8f7
1241795
5c0fab6
d53eee5
53626b7
281c72a
80667e9
a078102
7d10753
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -220,3 +220,28 @@ jobs: | |
which python | ||
pip install -e ".[test]" | ||
PYMONGO_MUST_CONNECT=1 pytest -v -k client_context | ||
|
||
test_minimum: | ||
permissions: | ||
contents: read | ||
runs-on: ubuntu-latest | ||
name: Test using minimum dependencies and supported Python | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb # v5 | ||
with: | ||
python-version: '3.9' | ||
- name: Start MongoDB | ||
uses: supercharge/mongodb-github-action@90004df786821b6308fb02299e5835d0dae05d0d # 1.12.0 | ||
with: | ||
mongodb-version: 6.0 | ||
- name: Run connect test | ||
shell: bash | ||
run: | | ||
uv venv | ||
source .venv/bin/activate | ||
uv pip install -e ".[test]" --resolution=lowest-direct | ||
pytest -v test/test_srv_polling.py | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry I just noticed this was test_srv_polling but test_dns would probably be a better choice. Or both? And should we do both sync and async? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Almost all of the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah okay then, could you add a comment explaining why we use test_srv_polling only and not test_dns? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like test_dns's mocking is not compatible with dnspython 1.0. Perhaps it's not worth it to add in that case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And unfortunately there's no There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding a separate test for dnspython 2.0 for async support. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ended up having to use dnspython 2.1.0, as 2.0.0 does not include the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does that mean we have to update our docs and error message to say >=2.1 is required for async? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I'll file a follow-up ticket for those changes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
Uh oh!
There was an error while loading. Please reload this page.