Metadata-Version: 2.4
Name: pytest-fahhh
Version: 0.1.1
Summary: A pytest plugin that plays the fahhh meme sound when a test fails.
Keywords: pytest,plugin,sound,meme,fahhh
Author: Sami El Achi
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Pytest
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Testing
Requires-Dist: pytest>=7.0
Requires-Python: >=3.9
Project-URL: Documentation, https://github.com/samiashi/pytest-fahhh#readme
Project-URL: Homepage, https://github.com/samiashi/pytest-fahhh
Project-URL: Issues, https://github.com/samiashi/pytest-fahhh/issues
Project-URL: Releases, https://github.com/samiashi/pytest-fahhh/releases
Project-URL: Repository, https://github.com/samiashi/pytest-fahhh
Description-Content-Type: text/markdown

# pytest-fahhh

[![CI](https://github.com/samiashi/pytest-fahhh/actions/workflows/ci.yml/badge.svg)](https://github.com/samiashi/pytest-fahhh/actions/workflows/ci.yml)
[![PyPI version](https://img.shields.io/pypi/v/pytest-fahhh.svg)](https://pypi.org/project/pytest-fahhh/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)

`pytest-fahhh` is a tiny `pytest` plugin that plays a bundled `fahhh.mp3` whenever a test fails.

Install it, keep running `pytest` like normal, and every failed test call gets the meme sound effect.

## Install

If your project uses `uv`:

```bash
uv add --dev pytest-fahhh
```

If your project uses `pip`:

```bash
pip install pytest-fahhh
```

Pytest auto-discovers the plugin through the `pytest11` entry point, so there is no extra setup after install.
The important part is that `pytest-fahhh` must be installed in the same environment where you run `pytest`.

## Usage

Run `pytest` as usual:

```bash
pytest
```

When a test fails during its call phase, `pytest-fahhh` launches the bundled audio clip in the background.

## Disable It

Disable it for one run:

```bash
pytest --no-fahhh
```

Disable it through the environment:

```bash
PYTEST_FAHHH_DISABLE=1 pytest
```

Disable it in `pytest.ini`:

```ini
[pytest]
fahhh = false
```

## Platform Notes

- macOS: uses `afplay`
- Linux: tries `paplay`, `aplay`, `ffplay`, then `mpg123`
- Other platforms: installs fine, but the plugin currently warns and does nothing because no player command is configured yet

## Local Development

```bash
uv sync
make lint
make test
```

Run the intentional sound demo:

```bash
make demo-sound
```
