From 4bcfe06e58629c4ad9574f664782a02be0b426bc Mon Sep 17 00:00:00 2001 From: Jason Kai Date: Mon, 30 Oct 2023 16:09:57 -0400 Subject: [PATCH] Add callable helper for slow data generation 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. --- afids_utils/tests/helpers.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/afids_utils/tests/helpers.py b/afids_utils/tests/helpers.py index 96d0cd40..b7a38015 100644 --- a/afids_utils/tests/helpers.py +++ b/afids_utils/tests/helpers.py @@ -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)