Skip to content

Commit

Permalink
Note the existence of the standard descriptor test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
DRMacIver committed Mar 17, 2015
1 parent 73007b7 commit 194bdb8
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ for an example:
>>> strategy((int, int)).example()
(548, 12)
Note: example is just a method that's available for this sort of interactive debugging.
It's not actually part of the process that Hypothesis uses to feed tests, though
it is of course built on the same basic mechanisms.
strategy can also accept a settings object which will customise the SearchStrategy
returned:
Expand Down Expand Up @@ -423,10 +427,17 @@ of list you want:
(You don't have to use namedtuple for this, but I tend to because they're
convenient)
Note: example is just a method that's available for this sort of interactive debugging.
It's not actually part of the process that Hypothesis uses to feed tests, though
it is of course built on the same basic mechanisms.
Hypothesis also provides a standard test suite you can use for testing strategies
you've defined.
.. code:: python
from hypothesis.descriptortests import descriptor_test_suite
TestDecimal = descriptor_test_suite(Decimal)
TestDecimal is a unitest.TestCase class that will run a bunch of tests against the
strategy you've provided for Decimal to make sure it works correctly.
~~~~~~~~~~~~~~~~~~~~~
Extending a function?
Expand Down

0 comments on commit 194bdb8

Please sign in to comment.