File: 0001-Set-a-large-deadline-to-avoid-flaky-tests.patch

package info (click to toggle)
python-cmaes 0.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 336 kB
  • sloc: python: 2,111; sh: 98; makefile: 3
file content (34 lines) | stat: -rw-r--r-- 883 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From: Gard Spreemann <gspr@nonempty.org>
Date: Sun, 1 Jan 2023 11:45:43 +0100
Subject: Set a large deadline to avoid flaky tests

---
 tests/test_fuzzing.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/test_fuzzing.py b/tests/test_fuzzing.py
index a567607..843a396 100644
--- a/tests/test_fuzzing.py
+++ b/tests/test_fuzzing.py
@@ -1,11 +1,12 @@
 import hypothesis.extra.numpy as npst
 import unittest
-from hypothesis import given, strategies as st
+from hypothesis import given, settings, strategies as st
 
 from cmaes import CMA, SepCMA
 
 
 class TestFuzzing(unittest.TestCase):
+    @settings(deadline=1800000)
     @given(
         data=st.data(),
     )
@@ -34,6 +35,7 @@ class TestFuzzing(unittest.TestCase):
                 return
             optimizer.ask()
 
+    @settings(deadline=1800000)
     @given(
         data=st.data(),
     )