We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8fbaad commit 99b6550Copy full SHA for 99b6550
tests/test_workspacebuilder.py
@@ -24,6 +24,24 @@
24
25
26
def retry(seconds=RETRY_TIMEOUT_SECONDS):
27
+ """Retry a block of code until a time limit or ``break``.
28
+
29
+ .. code-block:: python
30
31
+ while retry():
32
+ p = w.attached_pane
33
+ p.server._update_panes()
34
+ if p.current_path == pane_path:
35
+ break
36
37
38
+ :param seconds: Seconds to retry, defaults to ``RETRY_TIMEOUT_SECONDS``,
39
+ which is configurable via environmental variables.
40
+ :type seconds: int
41
+ :rtype: void
42
43
+ :todo: Move to libtmux.test
44
+ """
45
return (lambda: time.time() < time.time() + seconds)()
46
47
0 commit comments