Metadata-Version: 2.1
Name: pytest-watcher
Version: 0.2.6
Summary: Continiously runs pytest on changes in *.py files
Home-page: https://github.com/olzhasar/pytest-watcher
License: MIT
Keywords: pytest,watch,watcher
Author: Olzhas Arystanov
Author-email: o.arystanov@gmail.com
Requires-Python: >=3.7.0,<4.0.0
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Utilities
Requires-Dist: watchdog (>=2.0.0)
Project-URL: Repository, https://github.com/olzhasar/pytest-watcher
Description-Content-Type: text/markdown

# A simple watcher for pytest

[![PyPI](https://img.shields.io/pypi/v/pytest-watcher)](https://pypi.org/project/pytest-watcher/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pytest-watcher)](https://pypi.org/project/pytest-watcher/)
[![GitHub](https://img.shields.io/github/license/olzhasar/pytest-watcher)](https://github.com/olzhasar/pytest-watcher/blob/master/LICENSE)

## Overview

**pytest-watcher** is a tool to automatically rerun `pytest` when your code changes.
It looks for the following events:

- New `*.py` file created
- Existing `*.py` file modified
- Existing `*.py` file deleted

## What about pytest-watch?

[pytest-watch](https://github.com/joeyespo/pytest-watch) was around for a long time and was solving exactly this problem. Sadly, `pytest-watch` is not maintained anymore and not working for many users. I wrote this tool as a substitute

## Install pytest-watcher

```
pip install pytest-watcher
```

## Usage

Specify the path that you want to watch:

```
ptw .
```

or

```
ptw /home/repos/project
```

Any arguments after `<path>` will be forwarded to `pytest`:

```
ptw . -x --lf --nf
```

You can also specify an alternative runner command with `--runner` flag:

```
ptw . --runner tox
```

## Compatibility

The utility is OS independent and should be able to work with any platform.

Code is tested for Python versions 3.7+

