🐛 fix(test): unpin pytest 6.0.2, which cannot run on Python 3.10 - #299
Open
joaquingx wants to merge 1 commit into
Open
🐛 fix(test): unpin pytest 6.0.2, which cannot run on Python 3.10#299joaquingx wants to merge 1 commit into
joaquingx wants to merge 1 commit into
Conversation
requirements/test.txt resolved pytest==6.0.2 (Sept 2020). Collecting any test
module under Python 3.10 crashes in pytest's assertion rewriter:
TypeError: required field "lineno" missing from alias
pytest gained 3.10 support in 6.2.5. test.in did not constrain pytest at all, so
add a floor and recompile. django==3.1.14 and the rest of base.txt are untouched.
Verified against this branch:
- estela-api's own suite is unchanged, 22 failed / 59 passed before and after.
Those failures are environmental (21 need a live MongoDB; test_docs.py
compares against a stale committed swagger spec) and predate this change.
- the bitmaker_billing external-app suite goes from "cannot collect" to
49 passed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
requirements/test.txtresolvedpytest==6.0.2(Sept 2020). Collecting any test module under Python 3.10 crashes in pytest's assertion rewriter:test.indid not constrainpytestat all, so the lockfile was free to resolve a version predating Python 3.10 support (added in pytest 6.2.5).Change
Add a floor in
test.inand recompile withpip-compile. Only the test-runner packages move:pytestpytest-djangodjango==3.1.14and everything else inbase.txtare untouched. Two files changed.Verification
estela-api's own suite is unchanged: 22 failed / 59 passed both before and after. Those failures are environmental and predate this change — 21 need a live MongoDB (ServerSelectionTimeoutErroron127.0.0.1:27017), andtests/api/test_docs.pycompares against a stale committed swagger spec. (tests/core/test_kubernetes.pyis excluded from both runs; it needs an in-cluster kube config.)bitmaker_billingexternal-app suite goes from "cannot collect" to 49 passed. That was the motivation:bitmaker-cloud-billingis adding CI that runs its tests against an estela checkout, and it currently has to override the pytest pin itself.🤖 Generated with Claude Code