test — run the project test suite
test calls the environment’s canonical test runner (typically pytest for Python projects). If a path is given, that path is passed through. Otherwise the env’s run_tests() method is invoked, which discovers a sane default for the language.
Schema
Section titled “Schema”| Arg | Type | Required | Description |
|---|---|---|---|
path | string | no | Specific test file or directory to run. Omit to run the full suite. |
Example invocation
Section titled “Example invocation”{"path": "tests/test_agent.py"}from chimera.tools.test import TestTool
tool = TestTool()result = tool.execute({}, env=local_env)print(result.metadata) # {'passed': 3922, 'failed': 0, 'errors': 0, 'total': 3922}Output sample
Section titled “Output sample”============================= test session starts =============================collected 3922 items...============================= 3922 passed in 41.3s =============================result.metadata carries parsed totals when the runner emits them. On failure, result.error reads Tests failed (exit code N) and the captured output is still in result.output.
See also
Section titled “See also”bash— the lower-level alternative.verify_answer— single-shot Python boolean check.