Skip to main content

A small library for testing your code

Project description

README

A simple library to test your python code.

Key Features:

  • no third-party dependencies, only the standard library is used
  • no need to inherit from any classes
  • no need to name your files and/or tests with the prefix 'test' added
  • it is possible to use native python assert python as well as library asserts
  • simple and understandable work with tests, data providers, checks
  • the ability to run based on a file with settings or passing arguments on the command line
  • automatic search for all tests in the current folder and subfolders
  • flexible configuration of both tests and their groups, the ability to group tests and run only selected groups
  • the ability to use both the built-in results processing tool and write your own
  • the ability to group, stop the test by timeout, parallel launch without installing additional plugins

Installation

Just use your pip

pip install checking

First test

Simple example:

from checking import *

def my_function_to_test(a,b)
    return a + b

@test
def any_name_you_like():
    # Check  1+1=2
    equals(2, my_function_to_test(1,1))

if __name__ == '__main__':
    # Runs all tests in current module
    start()

Only functions marked with the @test annotation are considered tests and will be run, you can name your tests as you wish, the main thing is to put the @test annotation

Contact me

Lexman2@yandex.ru

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

checking-0.1.7.tar.gz (28.9 kB view hashes)

Uploaded Source

Built Distribution

checking-0.1.7-py3-none-any.whl (37.9 kB view hashes)

Uploaded Python 3

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