Sithon is a testing library for Python!
Project description
Sithon
A small library used for test cases in Python, heavily inspired on V's test!
This project was made for learning purposes, and is not meant to be used in real projects, but you can still use it, it s just not 100% working well.
Features
Only supports assert x == y so far.
Asynchronous test cases supported.
Line count can be a bit off.
Usage
# All test files needs to be start with `test_`
import math
# All test functions needs to start with `test_`
def test_sum_function():
assert math.factorial(4) == 5
assert math.factorial(3) == 6
Go to the project directory
$ python3.10 -m sithon
./test_math.py:sum_function:6 | FAIL assert math.factorial(4) == 5
Left value: 24
Right value: 5
./test_math.py:sum_function:7 | PASSED assert math.factorial(3) == 6
Left value: 6
Right value: 6
Rules
You can't have any other functions that test functions inside of a test_ file.
You can't use import aliases
Install
pip install sithon
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 Distribution
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 Sithon-0.0.4.tar.gz.
File metadata
- Download URL: Sithon-0.0.4.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d335dbd0bd29418a95b3e999992764340f297308540b6860e0f6b5bed5475c52
|
|
| MD5 |
dc0fb09e58a78b6933b71bf66c29a00d
|
|
| BLAKE2b-256 |
9369ce89021a2398207c9d1b1c00339313fc38551ef847a619ceaf72c3a2a691
|
File details
Details for the file Sithon-0.0.4-py3-none-any.whl.
File metadata
- Download URL: Sithon-0.0.4-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f378e8497d3e909058d313a42f737f2872a39fa6a499c30c942e742cc30b8f6
|
|
| MD5 |
3959d50d140f70106cc746249eb3230d
|
|
| BLAKE2b-256 |
02384afcc994703df28df4cf9b120ca34bc2434d73acf072b81b8d88d987a13f
|