Open
Description
We now have both the code and CI job to run hypothesis
tests.
In this issue I invite everyone to propose ideas: what can we test with it?
Criteria:
- Tests should be suitable for property-based nature of
hypothesis
- The action under test should be fast and reliable (since
hypothesis
will produce a lot of cases to tests, we cannot do any slow / network related things) - Strategies for data generation should be rather simple (I think that later we can get to more complex strategies, but for now for the sake of simplicity and maintability I propose not to get too crazy with them)
What else?
Known applications
Property-based tests are great when there are certain patterns:
decode
andencode
dumps
andloads
There are also some hidden patterns as (example):
- If
'a' in s
then s.index('a')
must return an integer
Existing work
Good examples of exising stuff:
- Existing
hypothesis
tests intest_zoneinfo
by @pganssle - Existing tests in https://github.com/Zac-HD/stdlib-property-tests by @Zac-HD and others