cobratest
cobratest is a Rust-based Python test runner scaffold using PyO3 to discover and execute Python tests.
Install with pip
Create and activate a virtual environment, then install from the repository root:
python3 -m venv .venv
source .venv/bin/activate
pip install .
After installation, the cobratest command will be available in the virtual environment:
cobratest --help
The install also provides an importable Python package and module entrypoint:
python -c "import cobratest; print(cobratest.__version__)"
python -m cobratest --help
Features
- Python AST-based discovery for
def test_*functions andTest*classes - Support for simple parametrized tests via
@pytest.mark.parametrize - Module and class fixtures:
setup_module,teardown_module,setup_class,teardown_class,setup_function,teardown_function,setup_method,teardown_method - Parallel execution with
rayon - CLI and library API support via
cobratestcrate - JSON output for integration and tooling
- Plugin-style extension API with
cobratest::CobratestPluginandcobratest::register_plugin
Testing
Run tests using the cobratest command:
# List all discovered tests
cobratest list .
# Run all tests
cobratest run .
# Run tests in a specific directory
cobratest run ./tests/python
# Run with JSON output for integration
cobratest run . --json
For development, use cargo directly:
# Build and list tests
cargo run -- list .
# Build and run tests
cargo run -- run .
Getting started
- Install Rust and Python.
- Run
cargo run -- list . - Run
cargo run -- run .
Metadata
Release files for cobratest 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cobratest-0.1.0-cp314-cp314-manylinux_2_34_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.34+ x86-64 | Details for cobratest-0.1.0-cp314-cp314-manylinux_2_34_x86_64.whl |
Release files / cobratest-0.1.0-cp314-cp314-manylinux_2_34_x86_64.whl
| Download URL | cobratest-0.1.0-cp314-cp314-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.14 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
1ca8965e440a7407c256f734d19eb4d37c8eb8f2764030f7fb3b2cf3ff46d23a
|
|
BLAKE2b-256 checksum How to use checksums |
c5a3d67be3a0f23462b7c652492b65d6b4cc0f22f0647135974da2b238fb0a0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for cobratest 0.1.0
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.