a simple and readable python testing tool
Project description
TurboTest🔥
let's make test readable and simple
Give it a try
import TurboTest as tt
from my_module.my_function import my_function
def basic_operations():
result = my_function(2, 3)
expected = 5
tt.both_are_equal(result, expected)
def should_raise_AssertionError_for_input_less_than_25():
with tt.these_will_raise(AssertionError) as its: my_function(21)
tt.both_are_equal(its.exception_msg, "Invalid: Value is less than 25.")
What you will get:
TurboTest... at '/path/to/my_module' (Monday, Jan 1, 2024, 13:11:21 UTC-0800)
============================================================================================
[22:00:00] PASS: my_function: basic operation (1m2.3s)
[22:00:02] PASS: my_function: should raise AssertionError for input less than 25 (2m2.1s)
[22:02:00] FAIL: my_function/foo/bar: should do X (0m5.1s)
[22:03:00] FAIL: my_function/foo/bar: reject empty string (0m0.1s)
[22:05:12] PASS: xyz: exit if X equal to None (0m0.7s)
[22:07:45] FAIL: xyz: return None if Y does not exist (2m3.1s)
============================================================================================
Done, 100 test functions [pass/fail: 61/39] executed in [core/total: 31m2.0s/37m3.1s] 🔥🔥
with color:
[]
Install
- via PyPI: run
pip install turbotest
Misc
License
This project's source code and documentation are under the MIT license.
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
TurboTest-0.3.0b1.tar.gz
(2.8 kB
view details)
Built Distribution
File details
Details for the file TurboTest-0.3.0b1.tar.gz
.
File metadata
- Download URL: TurboTest-0.3.0b1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e58ca962fb5cc37c945387b76b376225f7854d578ccaf921640d8c377ebe86c3 |
|
MD5 | 43b6bdc9e3ee1486c4827e242772ef77 |
|
BLAKE2b-256 | 153ed4149c1f056bd554561130c9276d9cdc28dffa8ec3829019fb1fa72c5fd6 |
File details
Details for the file TurboTest-0.3.0b1-py3-none-any.whl
.
File metadata
- Download URL: TurboTest-0.3.0b1-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a938b513cbf4bcba9be640a4ab198ae6cefeb41bf7c65fa0891de30a396bcdba |
|
MD5 | a9acc71dc4d9a3c9185662380f33d60c |
|
BLAKE2b-256 | 67600562e4a038fe341237edb95b667b45cce7756ede56becb5f5d80d17fba22 |