Skip to main content

pytest integration for skilltest: auto-collect *.skilltest.yaml cases as pytest tests, built on skilltest-sdk.

Project description

skilltest-pytest

A pytest plugin for skilltest: run AI-skill tests and natural-language evals as ordinary pytest tests, and mix in your own deterministic checks. Built on skilltest-sdk — the SDK's code API is re-exported here, so a pytest suite needs only this one dependency.

Two ways to use it

Auto-collected case files. Name a case something.skilltest.yaml and pytest runs it:

# greet.skilltest.yaml
skill: ./skills/greeter
input: "Greet Dr. Smith."
evals:
  - type: boolean
    criterion: "the reply greets Dr. Smith by name"

As code, for matrices and deterministic mix-ins:

from skilltest_pytest import run_skill

def test_greeter():
    report = run_skill("cases/greet.yaml", platforms=["claude-code"], models=["claude-opus-4-8"])
    assert report.passed, report.describe_failures()
    assert "Dr. Smith" in report.runs[0].transcript.assistant_text()

Configuration

The plugin shells out to the skilltest binary. Point it at one with the SKILLTEST_BIN env var (or bin=), the provider with SKILLTEST_PROVIDER (or provider=), and set defaults in pyproject.toml:

[tool.pytest.ini_options]
skilltest_provider = "oneharness"
skilltest_platforms = ["claude-code"]
skilltest_models = ["claude-opus-4-8"]

See the repository root for the provider protocol and the full schema.

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

skilltest_pytest-0.2.2.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

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

skilltest_pytest-0.2.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file skilltest_pytest-0.2.2.tar.gz.

File metadata

  • Download URL: skilltest_pytest-0.2.2.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for skilltest_pytest-0.2.2.tar.gz
Algorithm Hash digest
SHA256 f5c53211a89bc9abcf97ae214b3a5de9a381e0174d5e257ab14b57141a9e5400
MD5 3ed1dafa1c1a0fba39430fcf70b77feb
BLAKE2b-256 74d51f29a80f33edb8000a2a96bc19f6a7d8b25cc31268d891f5789e9c23cde0

See more details on using hashes here.

File details

Details for the file skilltest_pytest-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: skilltest_pytest-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for skilltest_pytest-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e99e4e5e50c2caeb4e0ba8abc4fa51b323e9f677a84c0d7e78f95cba2b8e60a1
MD5 4943d476d6cfeab1c1f2fc1b8903be14
BLAKE2b-256 7d73f7f7be7dc5fb39bce22a47a83d2cb98c4e78067891d24a01b54701f2dc71

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