Skip to main content

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 size field tells the agent how much context it just consumed

Requirements

  • Python 3.8+
  • pytest 7.0+

Licence

MIT — see LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agency_pytest_agent_reporter-0.1.0.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agency_pytest_agent_reporter-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file agency_pytest_agent_reporter-0.1.0.tar.gz.

File metadata

File hashes

Hashes for agency_pytest_agent_reporter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7c0c800692229b9876db047a60d519da41d3c998c65fa361c46775a817533a3b
MD5 f058db892bb6cf25735a4d4bbc4f0d71
BLAKE2b-256 2016c72fc62bdcd6fa9cdfbdd796e57d0ae3551110d1c9844a966a4f96f391b8

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agency_pytest_agent_reporter-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agency_pytest_agent_reporter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b63e3027cc154ab4ac4c22751b4f719342a5715d1ed2badb6760f90081778e90
MD5 a1ea5e35afd5c9a385b3c26892d65cea
BLAKE2b-256 df6069223d85684e8154d539a31a064bfd8c0e4751efa04e34ff47df41efdc59

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page