test: Migrate to pytest-lazy-fixtures#7761
Conversation
pytest-lazy-fixture 0.6.3 has been unmaintained since 2020 and is
incompatible with pytest 8+ (it relies on `CallSpec2.funcargs`, removed
in pytest 9). Replace it with the maintained pytest-lazy-fixtures fork,
rewriting all `lazy_fixture("name")` call sites to `lf("name")`. The new
package ships type hints, so the `# type: ignore[import-untyped]`
comments on its imports are no longer needed.
This unblocks lifting the pytest version cap.
Closes #7759
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Docker builds report
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7761 +/- ##
==========================================
- Coverage 98.55% 98.40% -0.16%
==========================================
Files 1454 1454
Lines 56000 55995 -5
==========================================
- Hits 55193 55104 -89
- Misses 807 891 +84 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
|
Visual Regression19 screenshots compared. See report for details. |
khvn26
left a comment
There was a problem hiding this comment.
Looks like we have to migrate flagsmith-private first.
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Closes #7759
pytest-lazy-fixture0.6.3 has been unmaintained since 2020 and is incompatible with pytest 8+ — it relies on pytest's internalCallSpec2.funcargs, removed in pytest 9, causing every test module that imports it to error at collection. This currently forces us to keep pytest capped below 8 (see #7756).This PR migrates to the maintained
pytest-lazy-fixturesfork:pytest-lazy-fixture>=0.6.3,<0.7.0withpytest-lazy-fixtures>=1.4.0,<2.0.0in thedevextra, and dropped thepytest-lazy-fixture==0.6.3entry from[tool.uv].override-dependencies.lazy_fixture("name")call sites across 35 test files to the newlf("name")API. The change is purely mechanical — no test logic touched.# type: ignore[import-untyped]comments on the imports, sincepytest-lazy-fixturesships type hints (py.typed).The remaining acceptance criteria on #7759 (lifting the
pytest<8cap and removing the TODO markers) live on the #7756 branch and will be handled there once this is merged.How did you test this code?
make typecheck—Success: no issues found in 1697 source files.tests/integrationmodules).