pltb / python-testing

Examples of propery-based and performance testing in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Property-based and performance testing in Python

This repo showcases property-based and performance testing in Python done with:

Requirements

  • Python >=3.7 (+ pip3 available on PATH)
  • make

Setting up the environment

This project uses virtualenv to isolate the environment in which it is being run.

For instance, on MacOS, you would have to run:

$ python3 -m venv test-venv
$ source test-venv/bin/activate

Mind the possible necessity of using a different activation script, see ls test-venv/bin.

Installing

This project uses setuptools. To install the project in-place along with its dependencies run:

make install

Run tests

The tests are written using property-based testing library Hypothesis. To run the tests:

make test

Run benchmarks

Benchmarking is done with pytest-benchmark library. To run the benchmarks:

make bench

About

Examples of propery-based and performance testing in Python


Languages

Language:Python 94.1%Language:Makefile 5.9%