Karva (0.0.1-alpha.5)
A Python test framework, written in Rust.
We'd love for you to try Karva! It's currently in alpha, and your feedback helps shape the project. Get started or join us on Discord.
About Karva
Karva aims to be an efficient alternative to pytest and unittest.
Karva is intentionally narrower in scope than pytest. Not every pytest
feature encourages high quality tests, and we'd rather omit features than
ship ones that quietly make test suites worse. Karva draws on the Rust testing ecosystem,
where projects like uv and
ruff show what a disciplined test suite
can look like. By keeping the surface area small, we hope to nudge
Python testing in the same direction.
nextest is the clearest example of what we're aiming for, and meeting the bar it sets is an explicit goal of this project.
Getting started
Installation
Karva is available as karva on PyPI.
Use karva directly with uvx:
| Bash | |
|---|---|
1 2 | |
Or install karva with uv, or pip:
| Bash | |
|---|---|
1 2 3 4 5 6 7 8 | |
Usage
By default, Karva will respect your .gitignore files when discovering tests in specified directories.
To run your tests, try any of the following:
| Bash | |
|---|---|
1 2 3 4 5 6 7 8 | |
Contributing
Contributions are welcome! See CONTRIBUTING.md for more information.
You can also join us on Discord