Commit ed8858d
committed
Skip hypothesis tests in environments without hypothesis installed
Fedora/EPEL RPM builds in Packit run %check without test-only deps
on the buildroot. The collection step blew up trying to import
hypothesis on rawhide and the rest of the matrix would have followed.
pytest.importorskip is the standard idiom here: collects the module
only if hypothesis is on the path, skips cleanly with a clear reason
otherwise. GH Actions installs hypothesis via requirements.txt so
the tests still run there; downstream packagers no longer need to
care about it.1 parent 72b9522 commit ed8858d
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
| |||
0 commit comments