Agent-friendly structured test data collector for pytest
Project description
pytest-kedge ⚓
I built this as a way to abstract tests for agentic workflows, currently it just creates basic x -> f(x) -should be-> y or x -> f(x) -should be-> Exception but its great to stop claude from mucking about
Installation
Using uv (recommended):
uv add pytest-kedge
Usage
Define your component or function, then create a TestSuite. pytest will find it and run it automatically.
from pytest_kedge import TestSuite, TestCase from my_app import add_numbers
math_tests = TestSuite(
target=add_numbers,
scenarios=[
TestCase(
name="happy_path",
input={"a": 1, "b": 2},
expected=3,
test_failure_message="Basic addition failed",
),
TestCase(
name="type_error",
input={"a": "1", "b": 2},
expected=TypeError,
test_failure_message="Did not catch string input",
),
],
)
Agent-Friendly Reporting
- Run pytest with the kedge flag to get a concise summary:
uv run pytest --kedge-summary
Output:
Kedge Agentic Summary FAILURES DETECTED:
❌ renders_correctly Reason: Kedge Scenario Failed: Footer mismatch SUCCESSES:
✅ smoke_test
Development & Testing Clone the repo.
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 pytest_kedge-0.1.1.tar.gz.
File metadata
- Download URL: pytest_kedge-0.1.1.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e7337a5111dc5df764b295b40aa6d3b9d9ab803999c9123ba7eb1ca299aee87
|
|
| MD5 |
0b21e40a827c8aef32ad99f22b8299e3
|
|
| BLAKE2b-256 |
293d4a462aed146cc1c99da9452554eb55a3659ea9943ddc48067443728f02e1
|
Provenance
The following attestation bundles were made for pytest_kedge-0.1.1.tar.gz:
Publisher:
publish.yml on bowmanpete123/pytest-kedge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_kedge-0.1.1.tar.gz -
Subject digest:
7e7337a5111dc5df764b295b40aa6d3b9d9ab803999c9123ba7eb1ca299aee87 - Sigstore transparency entry: 812944951
- Sigstore integration time:
-
Permalink:
bowmanpete123/pytest-kedge@5be276365e89524dbfb6fceda4652eef5954bcc1 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/bowmanpete123
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5be276365e89524dbfb6fceda4652eef5954bcc1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pytest_kedge-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pytest_kedge-0.1.1-py3-none-any.whl
- Upload date:
- Size: 16.5 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 |
43168d0f79bf9e9a05533b8795f7678911d6211bebfae92315b9c8cd0a090b8f
|
|
| MD5 |
d75d4b11c7fc37b340e176fdbc1a651b
|
|
| BLAKE2b-256 |
fabe7b04d97a68e03cc6fb36b94e23d1b29e69f3ddb746538208f4434cceed05
|
Provenance
The following attestation bundles were made for pytest_kedge-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on bowmanpete123/pytest-kedge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_kedge-0.1.1-py3-none-any.whl -
Subject digest:
43168d0f79bf9e9a05533b8795f7678911d6211bebfae92315b9c8cd0a090b8f - Sigstore transparency entry: 812944954
- Sigstore integration time:
-
Permalink:
bowmanpete123/pytest-kedge@5be276365e89524dbfb6fceda4652eef5954bcc1 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/bowmanpete123
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5be276365e89524dbfb6fceda4652eef5954bcc1 -
Trigger Event:
push
-
Statement type: