Skip to content

Commit b04456b

Browse files
docs: Document PytrizeFixtureUsages command in README
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1c6840f commit b04456b

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ Several things:
4444
- Provides a command to rename the fixture under the cursor (by name), see [fixture](#rename-fixture) below.
4545
Done by calling `PytrizeRenameFixture`.
4646
Alternatively `lua require('pytrize.api').rename_fixture()`.
47+
- Provides a command to find all usages of the fixture under the cursor across the project, see [fixture usages](#fixture-usages) below.
48+
Done by calling `PytrizeFixtureUsages`.
49+
Alternatively `lua require('pytrize.api').fixture_usages()`.
4750

4851
## Installation
4952

@@ -117,6 +120,13 @@ To jump to the declaration of a fixture under the cursor, do `PytrizeJumpFixture
117120

118121
To rename the fixture under the cursor, do `PytrizeRenameFixture`:
119122

123+
## Fixture usages
124+
125+
To find all usages of the fixture under the cursor, do `PytrizeFixtureUsages`.
126+
127+
Results are loaded into Neovim's quickfix list and the quickfix window is opened automatically.
128+
Each entry shows the file, line, and the line content where the fixture is used — as a parameter, a body reference, or inside `@pytest.mark.usefixtures(...)`. The fixture definition itself is excluded from the results.
129+
120130
## Input
121131

122132
In some cases the file-path is not printed by pytest, for example when a test fails when it might look something like:

0 commit comments

Comments
 (0)