Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 906369d33d
Fetching contributors…

Cannot retrieve contributors at this time

executable file 89 lines (69 sloc) 2.268 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
#!/usr/bin/env python
"""
pyqcy
=====

*pyqcy* [pyksi:] is an automated testing framework for Python
inspired by the wonderful *QuickCheck* library for Haskell.

What's the idea?
----------------

Instead of writing fully-fledged test cases, with *pyqcy*
you simply define logical **properties** that your code
is expected to satisfy. Based on that, *pyqcy* will
automatically generate test cases for you - hundreds of them,
in fact!

How does it look like?
----------------------

For starters, try this::

from pyqcy import qc, int_, main

@qc
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__':
main()

::

$ pip install pyqcy
$ python test.py
addition_actually_works: passed 100 tests.

*pyqcy* generated 100 test cases and checked whether
they all pass. For a few lines of code, that's rather nice,
isn't it? :)

Of course, you are not limited to integers - there is
built-in support for all standard types, including lists
and dictionaries. Custom classes can be used as well:
just specify how to generate an *@arbitrary* object
of your class, and you're set.

Hey, I like it!
---------------

Then check these links to find out more:

* `website <http://xion.io/pyqcy>`_
* `documentation <http://pyqcy.readthedocs.org>`_
* `github <http://github.com/Xion/pyqcy>`_
"""
from setuptools import setup, find_packages

import pyqcy


setup(
    name="pyqcy",
    version=pyqcy.__version__,
    description="QuickCheck-like testing framework for Python",
    long_description=__doc__,
    author='Karol Kuczmarski "Xion"',
    author_email="karol.kuczmarski@gmail.com",
    url="http://xion.io/pyqcy",
    license="Simplified BSD",

    classifiers=[
        "Development Status :: 3 - Alpha",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: BSD License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2.6",
        "Programming Language :: Python :: 2.7",
        "Topic :: Software Development :: Testing",
    ],

    platforms='any',
    packages=find_packages(),
    tests_require=['nose'],
)
Something went wrong with that request. Please try again.