Skip to main content

pytest-fzf

PyPI version Python versions Tests codecov

fzf-based test selection with pytest

demo

(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.

Metadata

Release files for pytest-fzf 0.1.2.post1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-fzf 0.1.2.post1
File Size Uploaded
pytest_fzf-0.1.2.post1.tar.gz 25.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-fzf 0.1.2.post1
File Interpreter ABI Platform
pytest_fzf-0.1.2.post1-py3-none-any.whl Python 3 none any Details

Total release size: 44.1 kB

Release files / pytest_fzf-0.1.2.post1.tar.gz

Download URL pytest_fzf-0.1.2.post1.tar.gz
Size 25.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5392e444e4223183481d0f58c99a771de498d356a42af2559f54141526e29b13
BLAKE2b-256 checksum
How to use checksums
d03f03a9dee7ba25bb37183bc9ace985eb54a657e4a303b79f3cd2b0b8834a46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 6, 2025.

Transparency log

Release files / pytest_fzf-0.1.2.post1-py3-none-any.whl

Download URL pytest_fzf-0.1.2.post1-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d38aa496551f5aac2c822797380f0832f2d7bb4582b46e9d32b8ae6bab4227c
BLAKE2b-256 checksum
How to use checksums
635db4eb9a0f8192232267999f76c5285a6967bade4bb022fbec1b06cbd91d3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 6, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2.post1 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.5

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page