Skip to content

fix: support pytest11 plugin fixtures from workspace editables in lsp#90

Merged
bellini666 merged 5 commits intobellini666:masterfrom
benediktziegler:detect-entry-point-from-workspace-install
Feb 20, 2026
Merged

fix: support pytest11 plugin fixtures from workspace editables in lsp#90
bellini666 merged 5 commits intobellini666:masterfrom
benediktziegler:detect-entry-point-from-workspace-install

Conversation

@benediktziegler
Copy link
Copy Markdown
Contributor

The lsp doesn't match fixtures from plugins installed from the current workspace via pytest11 entrypoints. But it works in the CLI fixtures list command.

Add is_plugin flag to FixtureDefinition and track plugin fixture files.
Update resolver, scanner, and diagnostics to recognize fixtures from pytest11 entry point plugins in workspace-local editable installs.

Add comprehensive tests for plugin fixture discovery, resolution, availability, and priority over third-party fixtures.

Add is_plugin flag to FixtureDefinition and track plugin fixture files.
Update resolver, scanner, and diagnostics to recognize fixtures from
pytest11 entry point plugins in workspace-local editable installs.
Add comprehensive tests for plugin fixture discovery, resolution,
availability, and priority over third-party fixtures.
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 84.90566% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.93%. Comparing base (b971dc4) to head (76d7199).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
src/fixtures/resolver.rs 76.19% 5 Missing ⚠️
src/fixtures/analyzer.rs 33.33% 2 Missing ⚠️
src/fixtures/undeclared.rs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #90      +/-   ##
==========================================
+ Coverage   55.45%   56.93%   +1.48%     
==========================================
  Files          26       26              
  Lines        3035     3086      +51     
==========================================
+ Hits         1683     1757      +74     
+ Misses       1352     1329      -23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes LSP fixture visibility for pytest plugins registered via pytest11 entry points when the plugin is provided by a workspace-local editable install (so fixtures show up consistently in hover/definition/completions/diagnostics, matching the CLI behavior).

Changes:

  • Add is_plugin to FixtureDefinition and track “plugin fixture files” discovered via pytest11 entry points.
  • Extend scanner/import scanning to mark plugin files (and propagate plugin status transitively), and extend resolver priority rules to include workspace-local plugin fixtures (Priority 2.5).
  • Add comprehensive tests covering discovery, resolution, availability, priority vs conftest, and diagnostics behavior.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/test_lsp.rs Updates fixture struct literals to include the new is_plugin field.
tests/test_fixtures.rs Adds end-to-end and focused tests for workspace-editable pytest11 plugin fixture discovery/resolution/availability/priority.
src/fixtures/undeclared.rs Treats plugin fixtures as “available” to avoid false undeclared diagnostics.
src/fixtures/types.rs Adds is_plugin field to FixtureDefinition.
src/fixtures/scanner.rs Marks plugin files discovered via pytest11 entry points; propagates plugin status to imported modules; increases plugin directory scan depth.
src/fixtures/resolver.rs Adds Priority 2.5 resolution/availability for non-third-party plugin fixtures.
src/fixtures/mod.rs Adds plugin_fixture_files to FixtureDatabase.
src/fixtures/analyzer.rs Sets FixtureDefinition.is_plugin based on whether the analyzed file is marked as a plugin file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Clarify comments and code to reflect plugin fixtures as priority 3
and third-party as priority 4, matching project documentation.
@bellini666 bellini666 merged commit b5894f2 into bellini666:master Feb 20, 2026
14 checks passed
@benediktziegler benediktziegler deleted the detect-entry-point-from-workspace-install branch February 20, 2026 14:01
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.

3 participants