Skip to content

feat: first-class support for pytest's built-in request fixture#4

Closed
Copilot wants to merge 3 commits intomasterfrom
copilot/update-from-bellini666-pytest-language-server
Closed

feat: first-class support for pytest's built-in request fixture#4
Copilot wants to merge 3 commits intomasterfrom
copilot/update-from-bellini666-pytest-language-server

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 2, 2026

Syncs from bellini666/pytest-language-server (PR bellini666#129). pytest's request fixture is injected programmatically by FixtureManager and never appears as a @pytest.fixture-decorated function, making it invisible to the AST scanner.

Changes

  • src/fixtures/scanner.rs: Register a synthetic FixtureDefinition for request at 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 registration
  • tests/test_fixtures.rs / tests/test_lsp.rs: Test coverage for request fixture 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
    • Triggering command: /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

Update from bellini666/pytest-language-server

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 request fixture Apr 2, 2026
Copilot AI requested a review from benediktziegler April 2, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants