anna-executa-test
Pytest plugin and helpers for testing Anna Executa stdio JSON-RPC tool plugins.
Companion to @anna/cli and @anna/app-test — covers the plugin side of
an Anna App while @anna/app-test covers the bundle side.
Install
uv pip install anna-executa-test
# or
pip install anna-executa-test
Usage
Drop a tests/test_smoke.py next to your plugin:
from pathlib import Path
import pytest
from anna_executa_test import describe_plugin, executa, assert_jsonrpc_ok
PLUGIN_DIR = Path(__file__).parent.parent
@pytest.fixture(scope="module")
def plugin():
with executa.spawn(PLUGIN_DIR) as p:
yield p
def test_describe(plugin):
info = plugin.call("describe")
assert info["name"].startswith("tool-")
assert info["tools"], "plugin should declare at least one tool"
def test_invoke_get_state(plugin):
resp = plugin.call("invoke", {"tool": "session", "arguments": {"action": "get_state"}})
assert resp["success"] is True
Public API (Phase 5 MVP)
executa.spawn(project_dir, *, command=None, env=None)— context manager spawning the plugin underuv run. ReturnsExecutaClient.ExecutaClient.call(method, params=None, *, timeout=10.0)— one JSON-RPC request/response round-trip.ExecutaClient.invoke(tool, arguments)— sugar for the common case.ExecutaClient.describe()/.health()— sugar for the standard control methods.assert_jsonrpc_ok(resp)/assert_jsonrpc_error(resp, code=...)wire_format.validate_response(env)— strict envelope shape check matchingnexus.executa_wire.contract.contract_for(project_dir)— readpyproject.toml+ spawn briefly to captureMANIFEST; exposes.parametrize_invoke(...).mock_state_dir(tmp_path)— pytest fixture overridingXDG_STATE_HOMEand friends.
Metadata
Release files for anna-executa-test 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| anna_executa_test-0.1.1.tar.gz | 11.0 kB | Without provenance | Details for anna_executa_test-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anna_executa_test-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for anna_executa_test-0.1.1-py3-none-any.whl |
Total release size: 22.2 kB
Release files / anna_executa_test-0.1.1.tar.gz
| Download URL | anna_executa_test-0.1.1.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a33412a14107dcfd598d20ff1f5a463c3a60b15f9ca901f773ee91aaaa66eaf
|
|
BLAKE2b-256 checksum How to use checksums |
5d452233aa4b4c0c3d7a37fe8b4594a35a10430463dcef27de1604c077cb473b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / anna_executa_test-0.1.1-py3-none-any.whl
| Download URL | anna_executa_test-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d1b1ab983ae6f65b32f2a8969a16d8a41d46da172da8280960f96c1aa7b8725
|
|
BLAKE2b-256 checksum How to use checksums |
bd25bb50f0c60d494f65e8298786275431a7b839937ea6d77ea59c9d80de9af6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for anna-executa-test 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.