intest
Rust-like inline tests for Python. Write and run tests right next to your code!
Haven't tested this on large projects, but it provides the amazing feature of rust which is a single file with its tests
Surprised this didn't exist prior
No async, no fixtures, no fancy stuff
Installation
pip install intest
Usage
In your Python files:
from intest.decorators import test, before_each, after_each
def add(a: int, b: int) -> int:
return a + b
@test
def test_add():
assert add(2, 2) == 4
@test(tag="math")
def test_add_negative():
assert add(-2, -2) == -4
Run tests:
# Run all tests in project
intest
# Run specific files
intest file1.py file2.py
# Run tests with specific tag
intest --tag math
# Run tests in specific directory
intest --path /path/to/project
Metadata
Release files for intest 0.2.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 | Actions |
|---|---|---|---|---|
| intest-0.2.0.tar.gz | 4.8 kB | Without provenance | Details for intest-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| intest-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for intest-0.2.0-py3-none-any.whl |
Total release size: 10.4 kB
Release files / intest-0.2.0.tar.gz
| Download URL | intest-0.2.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b52ba30eadaf3d204c06ee9c5e3cb9235661686115b6cd0771a3f3ca58fb5842
|
|
BLAKE2b-256 checksum How to use checksums |
a397f635c902b0b3079a28fa54145b7f178e4fe019150f94988b76b3f062937c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.14
|
Release files / intest-0.2.0-py3-none-any.whl
| Download URL | intest-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ae3251c72d05b019127710dd3bd1d61164ef8eeac87c4dc8c9c75c613add1d8
|
|
BLAKE2b-256 checksum How to use checksums |
e5b59054d917e9c7b9149ca71f7c4aac3eb367e8125d6d69fd748fb725aaa32c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.14
|
Security for intest 0.2.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.