akane
A very simple, strongly typed library to easily create test cases for anything.
Info
This project is mostly purpose built to create e2e integration tests for my CLI apps (like goup, for example). I wanted something lean which takes almost no effort to write tests with. Feel free to use it for your own projects, but don't expect a great developer experience.If you are looking for proper testing libraries, feel free to take a look into the following resources.
Installation
pip install akane
or
pip install git+https://github.com/zekrotja/akane.git
Example
This example is also availble in the examples directory.
import os
import akane
from akane.assertions import assert_eq
from akane.procedures import setup, test, teardown
@setup()
def init_env_vars():
os.environ["FOO"] = "bar"
@test(name="environment variables")
def test_env():
assert_eq("bar", os.environ["FOO"])
@test(name="environment in shell")
def test_cmd():
res = akane.exec(("sh", "-c", "echo $FOO"))
assert_eq("bar\n", res)
@test(name="failing test")
def fails():
return (False, "whoops")
@teardown(name="environment variables")
def delete_env_vars():
del os.environ["FOO"]
def main() -> int:
return akane.run_all()
if __name__ == "__main__":
exit(main())
Metadata
Release files for akane 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| akane-1.1.0.tar.gz | 5.1 kB | Without provenance | Details |
Release files / akane-1.1.0.tar.gz
| Download URL | akane-1.1.0.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e587bee0af8dfb10d32e1528bd41e06e9bd7a2530d54c81f25edbf53165d4e4
|
|
BLAKE2b-256 checksum How to use checksums |
7a5fad700ef44a87e1e6c5bf854ed13d1cfa1ccf7a98e80b43fc12ec464f814b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Security for akane 1.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.