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.
Karva aims to be an efficient alternative to pytest and unittest.
Though, we do not want to support all of the features these tools support. The main reason for this is that I don't believe all of the pytest features promote good test quality, I think that the Rust testing ecosystem supports writing high quality tests, some high quality Rust tests can be seen in the uv and ruff repos. I believe that, with having a smaller set of testing features, we can have a good impact on the Python ecosystem.
One example of a good test framework is nextest, following standards set in this repo is an aim of this project.
Karva is available as karva on PyPI.
Use karva directly with uvx:
uvx karva test
uvx karva versionOr install karva with uv, or pip:
# With uv.
uv tool install karva@latest
# Add karva to your project.
uv add --dev karva
# With pip.
pip install karvaBy default, Karva will respect your .gitignore files when discovering tests in specified directories.
To run your tests, try any of the following:
# Run all tests.
karva test
# Run tests in a specific directory.
karva test tests/
# Run tests in a specific file.
karva test tests/test_example.pyContributions are welcome! See CONTRIBUTING.md for more information.
You can also join us on Discord