Metadata-Version: 2.4
Name: agency-pytest-agent-reporter
Version: 0.1.0
Summary: pytest plugin that prints unit test results in an agent-friendly way
License: MIT
License-File: LICENSE
Requires-Python: >=3.8
Requires-Dist: pytest>=7.0
Description-Content-Type: text/markdown

# agency-pytest-agent-reporter

A pytest plugin by [Agency.io](https://agency.io) that replaces the default terminal reporter with compact, agent-friendly output.

Standard pytest output is verbose and token-heavy. This plugin strips it down to the signal an AI agent actually needs: a dot per passing test, a concise failure block per failing test, and a summary that tells the agent exactly how much it just read.

## Install

```bash
pip install agency-pytest-agent-reporter
```

The plugin is auto-discovered by pytest via the `pytest11` entry point. No configuration required.

## Output format

### All passing

```
...........................................................................

73 passed (report size: 74 chars)
```

### Failures

```
..F..F.F...

FAILED tests/test_math.py::test_addition
AssertionError: expected 4, got 5
tests/test_math.py:12

FAILED tests/test_math.py::test_subtraction
AssertionError: expected 0, got -1
tests/test_math.py:18

FAILED tests/test_auth.py::test_login_invalid_password
ValueError: invalid credentials
tests/test_auth.py:44

8 passed, 3 failed (report size: 213 chars)
```

### Mixed outcomes

```
.s..F...

FAILED tests/test_api.py::test_timeout
TimeoutError: request exceeded 5s limit
tests/test_api.py:91

6 passed, 1 failed, 1 skipped (report size: 97 chars)
```

## Why

When an AI agent runs your test suite it reads the output to understand what broke and what to fix next. The default pytest reporter includes full tracebacks, decorative separators, file headers, timing breakdowns, and colour codes — most of which add tokens without adding meaning.

This plugin gives the agent:
- **Location** — exact file and line number of the failure
- **Reason** — the exception type and message, nothing more
- **Scale** — the `report size` field tells the agent how much context it just consumed

## Requirements

- Python 3.8+
- pytest 7.0+

## Licence

MIT — see [LICENSE](LICENSE)
