feat: first-class support for pytest's built-in request fixture#4
Closed
feat: first-class support for pytest's built-in request fixture#4
request fixture#4Conversation
pytest's `request` fixture is injected programmatically by `FixtureManager` and never appears as a `@pytest.fixture`-decorated function, so the AST scanner cannot discover it. A synthetic `FixtureDefinition` is now registered at venv-scan time, enabling hover, inlay hints, completions, go-to-definition, and code actions to work with it correctly. Co-authored-by: benediktziegler <92312834+benediktziegler@users.noreply.github.com>
Co-authored-by: benediktziegler <92312834+benediktziegler@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update from bellini666/pytest-language-server
feat: first-class support for pytest's built-in Apr 2, 2026
request fixture
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.
Syncs from
bellini666/pytest-language-server(PR bellini666#129). pytest'srequestfixture is injected programmatically byFixtureManagerand never appears as a@pytest.fixture-decorated function, making it invisible to the AST scanner.Changes
src/fixtures/scanner.rs: Register a syntheticFixtureDefinitionforrequestat venv-scan time, enabling full LSP support (hover, inlay hints, completions, go-to-definition, code actions)src/fixtures/analyzer.rs: Minor adjustments to accommodate the synthetic fixture registrationtests/test_fixtures.rs/tests/test_lsp.rs: Test coverage forrequestfixture across all LSP features; fix code action kind typo (source.fixAll.pytest-ls)Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/bellini666/pytest-language-server/commits/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt