Relative Content

Tag Archive for pythonpython-hypothesis

How to Use Python Hypothesis in Integration Tests

We’ve got pretty complex builder and factory classes/methods to build test/domain data for our unit tests using Hypothesis. Now for our integration tests, we’d like to use the same functionality, the only difference is that they should run only once regardless of the result of the test. One solution is to call example() on the composite strategy in the test (or test fixture) which works fine, but it prints a warning asking not to do it.