Skip to content

Commit

Permalink
Add callable helper for slow data generation
Browse files Browse the repository at this point in the history
Some tests may fail a HealthCheck due to slow data generation - namely
any tests that try to generate an entire AfidSet. This commit adds a
function to the helpers that disables this check.
  • Loading branch information
kaitj committed Dec 6, 2023
1 parent 85860cf commit 4bcfe06
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions afids_utils/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,10 @@ def inner(callable: _T, /) -> _T:
)(callable)

return inner


def slow_generation(callable: _T, /) -> _T:
"""Disable health check for slow data generation tests"""
return settings(
suppress_health_check=[HealthCheck.too_slow],
)(callable)

0 comments on commit 4bcfe06

Please sign in to comment.