Metadata-Version: 2.1
Name: pytest-fzf
Version: 0.0.13
Summary: fzf-based test selector for pytest
Author-email: Daniele Trifirò <dtrifiro@redhat.com>
License: GNU GPL v3.0
Project-URL: Issues, https://github.com/dtrifiro/pytest-fzf/issues
Project-URL: Source, https://github.com/dtrifiro/pytest-fzf
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Development Status :: 4 - Beta
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: iterfzf ==1.1.0.44.0
Requires-Dist: pytest >=6.0.0
Provides-Extra: dev
Requires-Dist: pytest-fzf[tests] ; extra == 'dev'
Provides-Extra: tests
Requires-Dist: pytest-sugar ==0.9.7 ; extra == 'tests'
Requires-Dist: pytest-cov ==4.1.0 ; extra == 'tests'
Requires-Dist: pytest-mock ==3.12.0 ; extra == 'tests'
Requires-Dist: mypy ==1.7.1 ; extra == 'tests'

# pytest-fzf

[![PyPI version](https://img.shields.io/pypi/v/pytest-fzf.svg)](https://pypi.org/project/pytest-fzf)
[![Python versions](https://img.shields.io/pypi/pyversions/pytest-fzf.svg)](https://pypi.org/project/pytest-fzf)
[![Tests](https://github.com/dtrifiro/pytest-fzf/actions/workflows/tests.yml/badge.svg)](https://github.com/dtrifiro/pytest-fzf/actions/workflows/tests.yml)

fzf-based test selection with `pytest`

[![demo](https://github.com/dtrifiro/pytest-fzf/assets/36171005/29f7a610-2f15-402f-a24f-af8bf7e0e71d)](https://asciinema.org/a/iAr18ilruuPM7pZ1EAfXkxfEf)

---

## Features

- Select tests to be run with pytest using fzf

## Requirements

- [fzf](https://github.com/junegunn/fzf)
- (Optional, for colored preview of test functions) `bat`[sharkdp/bat](https://github.com/sharkdp/bat)

## Installation

You can install `pytest-fzf` via [pip](https://pypi.org/project/pip/)
from [PyPI](https://pypi.org/project):

```bash
pip install pytest-fzf
```

## Usage

```bash
pytest --fzf [query]
```

Select multiple tests using tab (shift+tab selects and moves up), deselect previously
selected tests using using tab again.

Optionally, the initial query can be specified from the command line:

```bash
pytest --fzf query
```

## Contributing

Contributions are very welcome. Tests can be run with
[nox](https://github.com/wntrblm/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](http://www.gnu.org/licenses/gpl-3.0.txt) license, `pytest-fzf`
is free and open source software

## Issues

If you encounter any problems, please [file an
issue](https://github.com/dtrifiro/pytest-fzf/issues) along with a
detailed description.
