Repository navigation
Conversation
The class-scoped install_workspace fixture was defined as an instance method, which pytest 9 flags with PytestRemovedIn10Warning and pytest 10 removes outright — a future pytest bump would then error at collection and take out the whole install-script integration suite. The fixture never referenced self, so convert it to a @staticmethod, preserving the class-scope (run install.sh once per class) behaviour. Refs: #691
4 tasks done
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.
Description
Resolves the
PytestRemovedIn10Warningemitted by the install-script integration suite. The class-scopedinstall_workspacefixture was defined as an instance method — a pattern pytest 9 deprecates and pytest 10 removes. Since the project pinspytest==9.1.1, a future Renovate/Dependabot bump to pytest 10 would error at collection and take out the entireTestInstallScriptIntegrationsuite. This converts the fixture to a@staticmethod(it never usedself), keeping the class-scope "runinstall.shonce per class" behaviour.Type of Change
fix-- Bug fixtest-- Adding or updating testsModifiers
!)Changes Made
tests/test_install_script.py:TestInstallScriptIntegration.install_workspaceis now a@staticmethodfixture (dropped the unusedself);@pytest.fixture(scope="class")and the body are otherwise unchanged. The 17 tests already consume it via the fixture parameter, so no test-method changes were needed.CHANGELOG.md(+ manifest-syncedassets/workspace/.devcontainer/CHANGELOG.md): added a### Fixedentry under## Unreleased.Changelog Entry
Testing
just test— relevant subset)Manual Testing Details
Verified RED → GREEN with the deprecation escalated to an error so the warning is enforced, not merely observed:
1 error—pytest.PytestRemovedIn10Warning: Class-scoped fixture defined as instance methodat fixture setup.23 passed— noPytestRemovedIn10Warning.Checklist
CHANGELOG.mdin the[Unreleased]section (and pasted the entry above)Additional Notes
Committed from a NixOS host worktree. Three pre-commit hooks cannot execute on a bare NixOS host (the documented #683-class dynamic-linking limitation — they run in the Debian container / CI):
typosandruff(downloaded binaries) andpymarkdown(manylinuxlibstdc++C-extension). They were skipped for the local commit but independently validated and/or re-enforced by CI:ruff check+ruff format --checkon the changed file — clean via store-nativenix run nixpkgs#ruff.typoson the changed files — clean via store-nativenix run nixpkgs#typos.pymarkdown— deferred to CI (the change is a format-matching CHANGELOG entry).validate-commit-msg,bandit,check agent identity,sync-manifest) ran and passed;--no-verifywas not used.Refs: #691