Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #88345

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

References <CADZYRLdFMB818EBjSzg5qh4H3k7-0VoWocWAqvAdLJiP8m5j6g@mail.gmail.com> <mfcc76$lj4$1@ger.gmane.org>
From David MacIver <david@drmaciver.com>
Date 2015-03-30 22:46 +0200
Subject Re: Hypothesis 1.0: A production quality property-based testing library for Python
Newsgroups comp.lang.python
Message-ID <mailman.348.1427749388.10327.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On 30 March 2015 at 22:37, Terry Reedy <tjreedy@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
>

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Hypothesis 1.0: A production quality property-based testing library for Python David MacIver <david@drmaciver.com> - 2015-03-30 22:46 +0200

csiph-web