Skip to content

LSP: Navigation support for pytest fixtures #1901

@aba-git

Description

@aba-git

Describe the Bug

Navigation features related to pytest fixtures like the "Go to Definition" and "Go to References" are not supported. I would expect to be able to jump to the definition from the fixture in the test parameters, as well as getting all usages listed when doing "Go to references" on the fixture implementation.

These are special cases since the fixtures are not called directly but resolved via name-based dependency injection by pytest during collection. Currently they are treated as common functions and parameters.

Tested on:
Vscode: 1.106.3
Pyrefly Extension: 0.46.0

Sandbox Link

No response

(Only applicable for extension issues) IDE Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    language-serverIssues specific to our IDE integration rather than type checkingneeds-discussionAn issue where it's not clear whether there is a bug or we are behaving as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions