Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Sithon-0.0.4.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Sithon-0.0.4-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

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

Hashes for Sithon-0.0.4.tar.gz
Algorithm Hash digest
SHA256 d335dbd0bd29418a95b3e999992764340f297308540b6860e0f6b5bed5475c52
MD5 dc0fb09e58a78b6933b71bf66c29a00d
BLAKE2b-256 9369ce89021a2398207c9d1b1c00339313fc38551ef847a619ceaf72c3a2a691

See more details on using hashes here.

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

Hashes for Sithon-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2f378e8497d3e909058d313a42f737f2872a39fa6a499c30c942e742cc30b8f6
MD5 3959d50d140f70106cc746249eb3230d
BLAKE2b-256 02384afcc994703df28df4cf9b120ca34bc2434d73acf072b81b8d88d987a13f

See more details on using hashes here.

Supported by

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