Skip to main content

Toolframe testkit

Toolframe testkit is a Python library for checking a plugin's public SDK contract and exercising an installed Toolframe Core application through its public CLI and HTTP APIs. It is a developer test dependency, not a Core runtime plugin. Use Python 3.14 or newer and a compatible SDK satisfying toolframe-sdk>=0.4.0,<1.

The package is Apache-2.0 licensed. It does not install Core, choose a global application, or load a pytest plugin automatically.

Quick start

Install the checker and opt-in pytest integration from PyPI:

python -m pip install 'toolframe-testkit[pytest]==0.2.1'

The SDK is installed as a dependency. See development and verification for source builds and local wheelhouse checks.

Check a public SDK definition in a unit test:

from toolframe_testkit import check_definition
from my_plugin.definition import plugin


def test_plugin_contract():
    check_definition(plugin).assert_valid()

For installed Core tests, explicitly load the pytest plugin in conftest.py:

pytest_plugins = ["toolframe_testkit.pytest_plugin"]

Then supply an installed Core command when running the test. The plugin creates a new private application home, starts Core on a loopback port, and removes the home after the test. A minimal tests/test_application.py can check readiness without installing a plugin:

def test_application(toolframe_application):
    assert toolframe_application.status()["ready"] is True

Child output is retained below the selected ignored build directory:

pytest tests/test_application.py \
  --toolframe-core-command "$(command -v toolframe-core)" \
  --toolframe-output-directory build/installed-core

See contract checks for definition and example validation, the application harness for installed Core testing, and development and verification for wheel builds and the real-Core fixture run. The complete standalone scenario is in examples/installed_application.py.

Support limits

The harness is deliberately explicit: callers choose the installed Core command, wheel links, and output directory. It uses public Core CLI and HTTP endpoints and does not import Core internals or edit an existing user application. The default local_control=False exercises Core's normal admission checks; setting it to True is available only when a test specifically needs local control behavior.

The pytest integration is opt-in through pytest_plugins or pytest -p; there is no pytest11 auto-entry point. check_definition validates the SDK model, target references, resource scopes, packaged UTF-8 documents, and supplied concrete examples. Example checks do not prove general JSON Schema implication or Core authorization behavior. MCP resource schemas may intentionally narrow a service schema.

The installed-Core harness covers public readiness, status, plugin lifecycle, service admission, authorization, schema rejection, and retained data. Browser interaction, provider-specific protocols, and external service provisioning need separate acceptance checks. The harness runs local processes; it does not manage remote deployments. It redacts its owned management token and common bearer/token query forms, but cannot guarantee redaction of arbitrary plugin output.

For release validation and Trusted Publisher setup, see releasing.

For development hooks and contribution rules, see Contributing.

Plugin dependencies allow compatible SDK 0.x updates from the declared minimum. See the SDK compatibility policy for API guarantees and minimum/latest verification.

Metadata

Release files for toolframe-testkit 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for toolframe-testkit 0.2.1
File Size Uploaded Provenance Actions
toolframe_testkit-0.2.1.tar.gz 63.7 kB With provenance Details for toolframe_testkit-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for toolframe-testkit 0.2.1
File Interpreter ABI Platform Actions
toolframe_testkit-0.2.1-py3-none-any.whl Python 3 none any Details for toolframe_testkit-0.2.1-py3-none-any.whl

Total release size: 82.2 kB

Release files / toolframe_testkit-0.2.1.tar.gz

Download URL toolframe_testkit-0.2.1.tar.gz
Size 63.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c87b0179a712f6dde48b43178e5afd6aca88b6a6140e1b93d5e86866af621ac3
BLAKE2b-256 checksum
How to use checksums
cd65bcddf84c75b17b93bf77722c79ba826d6f345a6d88746313b9d55390af9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Release files / toolframe_testkit-0.2.1-py3-none-any.whl

Download URL toolframe_testkit-0.2.1-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
afc6318683ef43ab063e8a80c9428be8bafe87a300b761ae29b7f4d5001be1ec
BLAKE2b-256 checksum
How to use checksums
a752fb56b76b0e1fbb9cb0e4547d6840636916b418768d58ce7c840dfda9b51d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Security for toolframe-testkit 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for toolframe_testkit-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page