Hypothesis 1.0: A production quality property-based testing library for Python

David MacIver david at drmaciver.com
Mon Mar 30 16:46:47 EDT 2015


On 30 March 2015 at 22:37, Terry Reedy <tjreedy at udel.edu> wrote:

> On 3/30/2015 2:44 PM, David MacIver wrote:
>
>> Hypothesis is a Python library for turningunit tests into generative
>> tests, covering a far wider range of cases thanyou can manually. Rather
>> than just testing for thethings you already know about, Hypothesis goes
>> out and actively hunts forbugs in your code.It usually finds them, and
>> when it does it gives you simple and easy to read examples to demonstrate.
>>
>
> Iteresting.  Some years ago, Vickor Stinner wrote a fuzzing module
> (fusil?).  I believe he found some bugs in the stdlib with it.
>

Cool. I'd somehow missed fusil, thanks. It looks interesting and I'll have
a dig through it for ideas :-)

Hypothesis and fusil are aimed at somewhat different levels. Hypothesis is
closer to being for unit testing (I mean you can use it for integration
testing and other things just as easily, but that's not strictly its
strength) whileas fusil looks better for testing whole programs.


>
> https://www.python.org/dev/peps/pep-0484/
> proposes the addition of a 'typing' module for defining types beyond the
> builtins and ABCs, such as List(int), Union(tuple, list).  If and when it
> is accepted and added (maybe 3.5, maybe later), you should consider having
> Hypothesis accept the notations that it can work with.


Yes, definitely. Having something like that as standard would be great for
Hypothesis and I intend to support it once it becomes available.

(It will force me to finally figure out how to do staged APIs, with some
versions of the API only supported on some versions of python, but I need
to do that anyway. This might involve just shipping a compatibility layer
for previous versions of Python in with Hypothesis)


>
>
>  Full documentation is available at
>> http://hypothesis.readthedocs.org/en/latest/, or if you prefer you can
>> skip straight to the quick start guide:
>> http://hypothesis.readthedocs.org/en/latest/quickstart.html
>>
>
>
> --
> Terry Jan Reedy
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150330/e58043fa/attachment.html>


More information about the Python-list mailing list