File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change
1
+ """Tests for libtmux's testing utilities."""
1
2
from time import time
2
3
3
4
import pytest
7
8
8
9
9
10
def test_retry_three_times () -> None :
11
+ """Test retry_until()."""
10
12
ini = time ()
11
13
value = 0
12
14
@@ -28,6 +30,7 @@ def call_me_three_times() -> bool:
28
30
29
31
30
32
def test_function_times_out () -> None :
33
+ """Test time outs with retry_until()."""
31
34
ini = time ()
32
35
33
36
def never_true () -> bool :
@@ -41,7 +44,8 @@ def never_true() -> bool:
41
44
assert abs ((end - ini ) - 1.0 ) < 0.01
42
45
43
46
44
- def test_function_times_out_no_rise () -> None :
47
+ def test_function_times_out_no_raise () -> None :
48
+ """Tests retry_until() with exception raising disabled."""
45
49
ini = time ()
46
50
47
51
def never_true () -> bool :
@@ -55,6 +59,7 @@ def never_true() -> bool:
55
59
56
60
57
61
def test_function_times_out_no_raise_assert () -> None :
62
+ """Tests retry_until() with exception raising disabled, returning False."""
58
63
ini = time ()
59
64
60
65
def never_true () -> bool :
@@ -68,6 +73,7 @@ def never_true() -> bool:
68
73
69
74
70
75
def test_retry_three_times_no_raise_assert () -> None :
76
+ """Tests retry_until() with exception raising disabled, with closure variable."""
71
77
ini = time ()
72
78
value = 0
73
79
You can’t perform that action at this time.
0 commit comments