A Python test framework, written in Rust.
Project description
Karva (0.0.1-alpha.2)
A Python test framework, written in Rust.
About Karva
Karva aims to be an efficient alternative to pytest and unittest.
While we do not yet support all of pytest's features, we aim to gradually add support for pytest alternatives as we add features.
Getting started
Installation
Karva is available as karva on PyPI.
Use karva directly with uvx:
uvx karva test
uvx karva version
Or 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 karva
Usage
By 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.py
Example
Here is a small example usage
def test_pass():
assert True
def test_fail():
assert False, "This test should fail"
def test_error():
raise ValueError("This is an error")
Running karva:
uv run karva test tests/
Provides the following output:
test tests.test::test_pass ... ok
test tests.test::test_fail ... FAILED
test tests.test::test_error ... FAILED
diagnostics:
error[test-failure]: Test `test_fail` failed
--> tests/test.py:5:5
|
5 | def test_fail():
| ^^^^^^^^^
6 | assert False, "This test should fail"
|
info: Test failed here
--> tests/test.py:6:5
|
5 | def test_fail():
6 | assert False, "This test should fail"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
info: Error message: This test should fail
error[test-failure]: Test `test_error` failed
--> tests/test.py:9:5
|
9 | def test_error():
| ^^^^^^^^^^
10 | raise ValueError("This is an error")
|
info: Test failed here
--> tests/test.py:10:5
|
9 | def test_error():
10 | raise ValueError("This is an error")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
info: Error message: This is an error
test result: FAILED. 1 passed; 2 failed; 0 skipped; finished in 8ms
Contributing
Contributions are welcome! See CONTRIBUTING.md for more information.
You can also join us on Discord
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file karva-0.0.1a2.tar.gz.
File metadata
- Download URL: karva-0.0.1a2.tar.gz
- Upload date:
- Size: 125.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63033ec1ee8ae633f6091cbf37666f8982cfaf9f85aa4232b7fd887d79f85ae2
|
|
| MD5 |
d592b63db5de99cce0830e598a19e214
|
|
| BLAKE2b-256 |
b4d7eddbc061712118946ccb0cbe6cab76d28ad60e309f7d7c57fc879f934bde
|
File details
Details for the file karva-0.0.1a2-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: karva-0.0.1a2-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d03d89a5dc902420f8d662636eff6c26b889593d8cdd54718fb1fd113d0e4428
|
|
| MD5 |
98dfc525180ad23d8bd2d408cbefc0e0
|
|
| BLAKE2b-256 |
cc045bdae6128e94f0cc50cf1ca97dd1cf24d5791a80f5c2dc0ca8acc74c77cd
|
File details
Details for the file karva-0.0.1a2-cp310-abi3-win32.whl.
File metadata
- Download URL: karva-0.0.1a2-cp310-abi3-win32.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.10+, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86e82ff5c2db8c06b1832b877e0f151c95a3ee44895054e712161099bc57e36d
|
|
| MD5 |
af7473053424d073c78fff56ffdbb101
|
|
| BLAKE2b-256 |
1f1abe133522956fcf60718ef4e40d53ab5b0ac5653992263741ba9d19398166
|
File details
Details for the file karva-0.0.1a2-cp310-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: karva-0.0.1a2-cp310-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 4.1 MB
- Tags: CPython 3.10+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cee76d331e28cf14ff2ca5d27eb68f96b4b7ff188fa4077705e84e987247a114
|
|
| MD5 |
5f5292cf2a5c98c15e2b24cc9eb932dc
|
|
| BLAKE2b-256 |
0a737b50aa68deb8090bd0a4c964e7980dc6aaa29d0cf19efe1b2ca85f45af07
|
File details
Details for the file karva-0.0.1a2-cp310-abi3-musllinux_1_2_i686.whl.
File metadata
- Download URL: karva-0.0.1a2-cp310-abi3-musllinux_1_2_i686.whl
- Upload date:
- Size: 4.2 MB
- Tags: CPython 3.10+, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d28061b016b70b7ec197d4f44cdf4317fedd260503b207282aff394d95c4df36
|
|
| MD5 |
eb667ee94ef40e9733d839bd15508e69
|
|
| BLAKE2b-256 |
235764fcb74e6c9b17483e6f42e734ee7229cc2ce7475e54e88ada1b79ad02c5
|
File details
Details for the file karva-0.0.1a2-cp310-abi3-musllinux_1_2_armv7l.whl.
File metadata
- Download URL: karva-0.0.1a2-cp310-abi3-musllinux_1_2_armv7l.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.10+, musllinux: musl 1.2+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0c5b5bd58b3fdcf04e491b1232b560a440ca164595336b6260c7491c42fa506
|
|
| MD5 |
4782d6117b3fbf7b7022725a9610e25d
|
|
| BLAKE2b-256 |
c4dfb799ba54fd5945acab028947786e8cd5842d9da7b45639ece0cd959cc8a0
|
File details
Details for the file karva-0.0.1a2-cp310-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: karva-0.0.1a2-cp310-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 4.0 MB
- Tags: CPython 3.10+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f79f9ac7e7639741cbeea8a0531fe993f7b07c501526943a67daa0d63241136
|
|
| MD5 |
a4e83f713a5ad52a16dd3a9a5004d978
|
|
| BLAKE2b-256 |
2856ca89b343b13db972661fa9a45a03813e7323ce140fa880aa2f44029c92ca
|
File details
Details for the file karva-0.0.1a2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: karva-0.0.1a2-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.9 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4f868c0fd08a1c0c9bbedcfeb5ccafc016642cddb88fb618625b45ac2a76473
|
|
| MD5 |
f9b62b10a419462a51c894b9c151ab45
|
|
| BLAKE2b-256 |
d6e07e522e319c2628b6003c98c05800d913b87c50d00a34ea8b74e2eb4a6a81
|
File details
Details for the file karva-0.0.1a2-cp310-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: karva-0.0.1a2-cp310-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 4.1 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ec5c62affb71d38ee3651cc1dfb19936852f6b3dc14ff3d4faa0821ed261130
|
|
| MD5 |
2d90f8e6243b856fb052eda582e7a9d5
|
|
| BLAKE2b-256 |
659b629aff79700f75e48201eace948e549cbabb9f00c5f0e2cf3171498c6b3e
|
File details
Details for the file karva-0.0.1a2-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.
File metadata
- Download URL: karva-0.0.1a2-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a02128032bc246ad63b1f6c763d16062a1f90b31b7ade805585642824c38642
|
|
| MD5 |
946ea8a4d48e4bac7d433038a6c57530
|
|
| BLAKE2b-256 |
2cc6db04bbbfc60eb40a2f3f03d79c7e0f30f4df02ee974dec50ff7f9f43c3bb
|
File details
Details for the file karva-0.0.1a2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: karva-0.0.1a2-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
959d8dbaf8b2864dd2b3b78b0af6a5bd5afe88580ac96b380170ec1d8e8f3c96
|
|
| MD5 |
344777bab4cfc53bae5d864f9a2e00a1
|
|
| BLAKE2b-256 |
69651c8b2610f6b79e1066212223b4cdc16669d4538ffbffb3ee5324779d7bac
|
File details
Details for the file karva-0.0.1a2-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: karva-0.0.1a2-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
417fea8e4a774ba6ac2a41ffe7b9060609a727eaa874e89e7f5410512e34f230
|
|
| MD5 |
04481221bf83450b8be30808e874aa4d
|
|
| BLAKE2b-256 |
565e1a832a0d80ebe1969129f89c44d6ce0be979ec48f05051664be9db1d0f4e
|
File details
Details for the file karva-0.0.1a2-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: karva-0.0.1a2-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 3.6 MB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8bd88d519c7b831ea2c989f51d5d2dab5e30fa0b9598d85a0903f93b5c59ed3
|
|
| MD5 |
fc9a74d3d546eb0742147e861ad75d56
|
|
| BLAKE2b-256 |
729f179bac2704c97fbf43a9b620d417d40a88c0f9f3694ac85b64d524a38587
|