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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_fzf-0.1.2.post1.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_fzf-0.1.2.post1-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

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

Hashes for pytest_fzf-0.1.2.post1.tar.gz
Algorithm Hash digest
SHA256 5392e444e4223183481d0f58c99a771de498d356a42af2559f54141526e29b13
MD5 01e9370dd02cc0c8327d4fa0c42f6fd5
BLAKE2b-256 d03f03a9dee7ba25bb37183bc9ace985eb54a657e4a303b79f3cd2b0b8834a46

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_fzf-0.1.2.post1.tar.gz:

Publisher: release.yml on dtrifiro/pytest-fzf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pytest_fzf-0.1.2.post1-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_fzf-0.1.2.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d38aa496551f5aac2c822797380f0832f2d7bb4582b46e9d32b8ae6bab4227c
MD5 9443b7c86c34664211221ba3930a371b
BLAKE2b-256 635db4eb9a0f8192232267999f76c5285a6967bade4bb022fbec1b06cbd91d3c

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.2.post1 This release

2 files

0.1.1

2 files

0.1.0

2 files

0.0.14

2 files

0.0.13

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.5

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page