QuickCheck-like testing framework for Python

Project maintained by Xion Hosted on GitHub Pages — Theme by mattgraham


pyqcy [pyksi:] is a test framework that supports unique testing model, inspired by the brilliant QuickCheck library for Haskell. Rather than writing fully-fledged test cases, you only need to define logical properties that your code has to satisfy. Based on that, pyqcy will automatically generate test cases - hundreds of them, in fact!


from pyqcy import qc, int_, main

def addition_actually_works(
    x=int_(min=0), y=int_(min=0)
    the_sum = x + y
    assert the_sum >= x and the_sum >= y

if __name__ == '__main__':
$ python ./
addition_actually_works: passed 100 tests.

Yes, that's 100 distinct test cases. pyqcy has generated them all for you!


Either from PyPI:

$ pip install pyqcy

or directly from GitHub if you want the bleeding edge version:

$ git clone git://
$ cd pyqcy
$ ./ develop

Learn more

Check out documentation for detailed usage instructions and more information.

Going further

Although already usable, pyqcy is still in development phase. The aim is to have it mimic the Haskell's QuickCheck very closely while remaining pythonic and taking advantage of dynamic nature of the language.

Thoughts, opinions, ideas and contributions are all very welcome! Head over to GitHub for more info.