Skip to main content

Context-optimized test runner for coding agents

Project description

3pio

A context-friendly test runner for Python projects. 3pio enhances your existing test workflow by generating structured, AI-optimized reports without changing how your tests run.

Installation

pip install threepio-test-runner

Usage

# Run pytest tests
3pio pytest

# Run specific test file
3pio pytest tests/test_utils.py

# Run with pytest options
3pio pytest -v -s tests/

# Run unittest tests
3pio python -m unittest

# Run with coverage
3pio pytest --cov=myproject tests/

Why 3pio?

When working with AI coding assistants, test output often gets lost or truncated. 3pio solves this by:

  • Preserving all test output - Never lose print statements or error traces
  • Structured reports - Each test file gets its own organized log
  • AI-friendly format - Reports optimized for LLM context windows
  • Zero config - Works with your existing pytest/unittest setup
  • Non-intrusive - Your tests run exactly as before, 3pio just captures better reports

Supported Test Frameworks

  • pytest - Full support for pytest and its plugins
  • unittest - Python's built-in testing framework
  • nose2 - Works with nose2 test runner
  • Any Python test runner - Captures output from any test command

How It Works

3pio acts as a transparent wrapper around your test runner:

  1. Runs your tests with a custom plugin to capture structured data
  2. Preserves all console output and test results
  3. Generates organized reports in .3pio/runs/[timestamp]-[name]/
  4. Maintains full compatibility with your existing test configuration

Report Structure

After running tests, find your reports in:

.3pio/runs/
└── 20240110-143022-clever-penguin/
    ├── test-run.md              # Summary report
    ├── output.log               # Complete console output
    └── logs/
        ├── test_utils.py.log    # Per-file test results
        └── test_api.py.log      # Organized by test file

Repository

For source code, issues, and documentation: https://github.com/zk/3pio

License

MIT

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

threepio_test_runner-0.2.0.tar.gz (9.0 MB view details)

Uploaded Source

Built Distribution

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

threepio_test_runner-0.2.0-py3-none-any.whl (10.9 MB view details)

Uploaded Python 3

File details

Details for the file threepio_test_runner-0.2.0.tar.gz.

File metadata

  • Download URL: threepio_test_runner-0.2.0.tar.gz
  • Upload date:
  • Size: 9.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for threepio_test_runner-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1195bdd1af4f83a67580279579526085cd290fd1afe73d85eb1c007fb72baac8
MD5 be95d02bebd1c6d4b192c1423f084732
BLAKE2b-256 5f23d714e003834b982148fe3aebaa2dfe26318c2b80ad5e9b855edb5e4de561

See more details on using hashes here.

File details

Details for the file threepio_test_runner-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for threepio_test_runner-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b34d59a9a74b47ae9a5774131b05fce5d9875daadfc045d1e0d5a212223cfd7
MD5 618bc17bf02e332e9c31c8aed92392a2
BLAKE2b-256 73ebbeb65f2ca7e6aa54d6c73cf0579dd651b3605336466b4a05566f10e99acf

See more details on using hashes here.

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