diff test/test_token.py @ 7827:604da0650797

test: add basic tests using hypothesis It is segregated to its own file. I am skipping the entire file using importorskip(). Mixing hypothesis tests with non-hypothesis tests is tricky. Hypothesis uses decorators before test commands: @given(text()) @settings(max_examples=_max_examples) Pytest runs the decorators and the arguments as part of scanning the file for tests. This means the decorator (given, settings ...) and the strategies inside the decorators (e.g. text()) have to be defined using a lambda or something. Only aborting at the top of the file using importorskip prevents having to define all the symbols that would be imported from hypothesis.
author John Rouillard <rouilj@ieee.org>
date Sun, 24 Mar 2024 13:49:52 -0400
parents 6971c9249c6d
children 9a74dfeb8620
line wrap: on
line diff

Roundup Issue Tracker: http://roundup-tracker.org/