File: hypothesis_relax

package info (click to toggle)
python-xarray 2025.08.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,804 kB
  • sloc: python: 115,417; makefile: 260; sh: 47
file content (24 lines) | stat: -rw-r--r-- 829 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Author: Michael R. Crusoe <crusoe@debian.org>
Description: Workaround for 'Input generation is slow: Hypothesis only generated 4 valid inputs after 1.55 seconds.'
Forwarded: not-needed

Due to slow test runners.
--- python-xarray.orig/xarray/tests/test_strategies.py
+++ python-xarray/xarray/tests/test_strategies.py
@@ -10,7 +10,7 @@
 
 import hypothesis.extra.numpy as npst
 import hypothesis.strategies as st
-from hypothesis import given
+from hypothesis import given, settings, HealthCheck
 from hypothesis.extra.array_api import make_strategies_namespace
 
 from xarray.core.options import set_options
@@ -28,6 +28,7 @@
 
 
 class TestDimensionNamesStrategy:
+    @settings(suppress_health_check=[HealthCheck.too_slow])
     @given(dimension_names())
     def test_types(self, dims):
         assert isinstance(dims, list)