pytest plugin that prints unit test results in an agent-friendly way
Project description
agency-pytest-agent-reporter
A pytest plugin by 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
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 sizefield tells the agent how much context it just consumed
Requirements
- Python 3.8+
- pytest 7.0+
Licence
MIT — see LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agency_pytest_agent_reporter-0.1.0.tar.gz.
File metadata
- Download URL: agency_pytest_agent_reporter-0.1.0.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c0c800692229b9876db047a60d519da41d3c998c65fa361c46775a817533a3b
|
|
| MD5 |
f058db892bb6cf25735a4d4bbc4f0d71
|
|
| BLAKE2b-256 |
2016c72fc62bdcd6fa9cdfbdd796e57d0ae3551110d1c9844a966a4f96f391b8
|
Provenance
The following attestation bundles were made for agency_pytest_agent_reporter-0.1.0.tar.gz:
Publisher:
workflow.yml on agency-io/agency-pytest-agent-reporter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agency_pytest_agent_reporter-0.1.0.tar.gz -
Subject digest:
7c0c800692229b9876db047a60d519da41d3c998c65fa361c46775a817533a3b - Sigstore transparency entry: 1189247933
- Sigstore integration time:
-
Permalink:
agency-io/agency-pytest-agent-reporter@f420c458de596d1fe6879b6c5929ee3c9b3417e3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/agency-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@f420c458de596d1fe6879b6c5929ee3c9b3417e3 -
Trigger Event:
release
-
Statement type:
File details
Details for the file agency_pytest_agent_reporter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agency_pytest_agent_reporter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b63e3027cc154ab4ac4c22751b4f719342a5715d1ed2badb6760f90081778e90
|
|
| MD5 |
a1ea5e35afd5c9a385b3c26892d65cea
|
|
| BLAKE2b-256 |
df6069223d85684e8154d539a31a064bfd8c0e4751efa04e34ff47df41efdc59
|
Provenance
The following attestation bundles were made for agency_pytest_agent_reporter-0.1.0-py3-none-any.whl:
Publisher:
workflow.yml on agency-io/agency-pytest-agent-reporter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agency_pytest_agent_reporter-0.1.0-py3-none-any.whl -
Subject digest:
b63e3027cc154ab4ac4c22751b4f719342a5715d1ed2badb6760f90081778e90 - Sigstore transparency entry: 1189247963
- Sigstore integration time:
-
Permalink:
agency-io/agency-pytest-agent-reporter@f420c458de596d1fe6879b6c5929ee3c9b3417e3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/agency-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@f420c458de596d1fe6879b6c5929ee3c9b3417e3 -
Trigger Event:
release
-
Statement type: