Coder Social home page Coder Social logo

jcpetruzza / hypothesis-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hypothesisworks/hypothesis

0.0 3.0 0.0 9.41 MB

Advanced property-based (QuickCheck-like) testing for Python

Home Page: http://hypothesis.works

License: Other

Makefile 0.65% Jupyter Notebook 12.37% Shell 0.62% Python 85.76% PowerShell 0.46% Batchfile 0.14%

hypothesis-python's Introduction

Hypothesis

Hypothesis is an advanced testing library for Python. It lets you write tests which are parametrized by a source of examples, and then generates simple and comprehensible examples that make your tests fail. This lets you find more bugs in your code with less work.

e.g.

@given(st.lists(
  st.floats(allow_nan=False, allow_infinity=False), min_size=1))
def test_mean(xs):
    assert min(xs) <= mean(xs) <= max(xs)
Falsifying example: test_mean(
  xs=[1.7976321109618856e+308, 6.102390043022755e+303]
)

Hypothesis is extremely practical and advances the state of the art of unit testing by some way. It's easy to use, stable, and powerful. If you're not using Hypothesis to test your project then you're missing out.

Quick Start/Installation

If you just want to get started:

pip install hypothesis

The main Hypothesis site is at hypothesis.works, and contains a lot of good introductory and explanatory material.

Extensive documentation and examples of usage are available at readthedocs.

If you want to talk to people about using Hypothesis, we have both an IRC channel and a mailing list.

If you want to receive occasional updates about Hypothesis, including useful tips and tricks, there's a TinyLetter mailing list to sign up for them.

If you want to contribute to Hypothesis, instructions are here.

If you want to hear from people who are already using Hypothesis, some of them have written about it.

If you want to create a downstream package of Hypothesis, please read these guidelines for packagers.

hypothesis-python's People

Contributors

alexwlchan avatar alok avatar bachmann1234 avatar cdown avatar doismellburning avatar drmaciver avatar drvinceknight avatar inglesp avatar jab avatar jerith avatar jwg4 avatar killthrush avatar kxepal avatar lucaswiman avatar lukasa avatar maximkulkin avatar maxnordlund avatar moreati avatar mulkieran avatar pyup-bot avatar radix avatar rboulton avatar rob-smallshire avatar russel avatar the-compiler avatar tomprince avatar untitaker avatar wilfred avatar wjt avatar zac-hd avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.