fzf-based test selector for pytest
Project description
pytest-fzf
fzf-based test selection with pytest
(demo uses the gruvbox-dark pygments style)
Features
- Select tests to be run with pytest using fzf
Requirements
Installation
You can install pytest-fzf via pip
from PyPI:
pip install pytest-fzf
Usage
pytest --fzf [query]
pytest --fzf [--fzf-bat-preview] # uses bat as fzf preview command
Syntax highlighting theme
The theme used for previewing test functions can be set using PYTEST_FZF_THEME (or BAT_THEME, if you use bat, see sharkdp/bat):
export PYTEST_FZF_THEME='gruvbox-dark'
For a list of supported themes, see https://pygments.org/styles/ or get a list by running:
import pygments
for style in pygments.styles.get_all_styles():
print(style)
Keybindings
The following keybindings can be used in the fzf selection menu
- Tab: selected/deselect tests
- Shift+Tab: selected/deselect tests (move up)
- Ctrl+a: select/deselect all tests
Contributing
Contributions are very welcome. Tests can be run with nox, please ensure the coverage at least stays the same before you submit a pull request.
License
Distributed under the terms of the GNU GPL
v3.0 license, pytest-fzf
is free and open source software
Issues
If you encounter any problems, please file an issue along with a detailed description.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_fzf-0.1.2.post1.tar.gz.
File metadata
- Download URL: pytest_fzf-0.1.2.post1.tar.gz
- Upload date:
- Size: 25.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5392e444e4223183481d0f58c99a771de498d356a42af2559f54141526e29b13
|
|
| MD5 |
01e9370dd02cc0c8327d4fa0c42f6fd5
|
|
| BLAKE2b-256 |
d03f03a9dee7ba25bb37183bc9ace985eb54a657e4a303b79f3cd2b0b8834a46
|
Provenance
The following attestation bundles were made for pytest_fzf-0.1.2.post1.tar.gz:
Publisher:
release.yml on dtrifiro/pytest-fzf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_fzf-0.1.2.post1.tar.gz -
Subject digest:
5392e444e4223183481d0f58c99a771de498d356a42af2559f54141526e29b13 - Sigstore transparency entry: 160115105
- Sigstore integration time:
-
Permalink:
dtrifiro/pytest-fzf@a012fc3f02a73319c0987fe2137eb099d414d41b -
Branch / Tag:
refs/tags/0.1.2.post1 - Owner: https://github.com/dtrifiro
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a012fc3f02a73319c0987fe2137eb099d414d41b -
Trigger Event:
release
-
Statement type:
File details
Details for the file pytest_fzf-0.1.2.post1-py3-none-any.whl.
File metadata
- Download URL: pytest_fzf-0.1.2.post1-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d38aa496551f5aac2c822797380f0832f2d7bb4582b46e9d32b8ae6bab4227c
|
|
| MD5 |
9443b7c86c34664211221ba3930a371b
|
|
| BLAKE2b-256 |
635db4eb9a0f8192232267999f76c5285a6967bade4bb022fbec1b06cbd91d3c
|
Provenance
The following attestation bundles were made for pytest_fzf-0.1.2.post1-py3-none-any.whl:
Publisher:
release.yml on dtrifiro/pytest-fzf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_fzf-0.1.2.post1-py3-none-any.whl -
Subject digest:
6d38aa496551f5aac2c822797380f0832f2d7bb4582b46e9d32b8ae6bab4227c - Sigstore transparency entry: 160115106
- Sigstore integration time:
-
Permalink:
dtrifiro/pytest-fzf@a012fc3f02a73319c0987fe2137eb099d414d41b -
Branch / Tag:
refs/tags/0.1.2.post1 - Owner: https://github.com/dtrifiro
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a012fc3f02a73319c0987fe2137eb099d414d41b -
Trigger Event:
release
-
Statement type: