Skip to main content

a simple and readable python testing tool

Project description

TurboTest๐Ÿ”ฅ

let's make tests 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  (3๐Ÿงช|1m2.3s)
[22:00:02] PASS: my_function: should raise AssertionError for input less than 25  (9๐Ÿงช|2m2.1s)
[22:02:00] FAIL: abc123/foo/bar: should do X  (2๐Ÿงช|0m5.1s)
[22:03:00] FAIL: abc123/foo/bar: reject empty string  (17๐Ÿงช|0m0.1s)
[22:05:12] PASS: xyz/abc: exit if X equal to None  (9๐Ÿงช|0m0.7s)
[22:07:45] FAIL: xyz/pqr: return None if Y does not exist  (6๐Ÿงช|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


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.11.0b0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

TurboTest-0.11.0b0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file TurboTest-0.11.0b0.tar.gz.

File metadata

  • Download URL: TurboTest-0.11.0b0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.17

File hashes

Hashes for TurboTest-0.11.0b0.tar.gz
Algorithm Hash digest
SHA256 28e15e1bfaeeb22d7cd92c5fe8c3e95c0efcadf369ccf2b95fc4aada8bfb1f08
MD5 59236f5cc474c5af7abaf331d52ea6a3
BLAKE2b-256 9fcbecfbac61450a4610d773cd93a28c735d87ef1e320b3462e23050f55228a7

See more details on using hashes here.

File details

Details for the file TurboTest-0.11.0b0-py3-none-any.whl.

File metadata

File hashes

Hashes for TurboTest-0.11.0b0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a7fb22f8982db6c6e4f79ae986132d438795a75e69cda95d20f5ec001b94385
MD5 fd35f8f83014233ae66bdd4372bb85ed
BLAKE2b-256 855329545988d4b12af70772738d01a612a2bcca6dad4bb4b10b77bf9d9c6476

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page