Skip to content

Commit 9cae750

Browse files
committed
update libtmux to 0.7.8, fixes #354
1 parent 4fe4263 commit 9cae750

File tree

3 files changed

+4
-30
lines changed

3 files changed

+4
-30
lines changed

Pipfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ name = "pypi"
1212
[dev-packages]
1313

1414
kaptan = ">=0.5.7"
15-
libtmux = "==0.7.7"
15+
libtmux = "==0.7.8"
1616
click = "==6.7"
1717
colorama = "==0.3.9"
1818
docutils = "==0.14"

requirements/base.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
kaptan>=0.5.7
2-
libtmux==0.7.7 # Updated from 0.7.6
2+
libtmux==0.7.8
33
click==6.7
44
colorama==0.3.9

tests/test_workspacebuilder.py

+2-28
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
unicode_literals, with_statement)
66

77
import os
8-
import time
98

109
import kaptan
1110
import pytest
1211
from libtmux import Window
1312
from libtmux.common import has_gte_version
14-
from libtmux.test import temp_session
13+
from libtmux.test import temp_session, retry
1514

1615
from tmuxp import config, exc
1716
from tmuxp._compat import text_type
@@ -20,30 +19,6 @@
2019
from . import example_dir, fixtures_dir
2120
from .fixtures._util import loadfixture
2221

23-
RETRY_TIMEOUT_SECONDS = int(os.getenv('RETRY_TIMEOUT_SECONDS', 8))
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-
4722

4823
def test_split_windows(session):
4924
yaml_config = loadfixture("workspacebuilder/two_pane.yaml")
@@ -199,8 +174,7 @@ def assertIsMissing(cmd, hist):
199174
p.cmd('send-keys', 'Enter')
200175

201176
buffer_name = 'test'
202-
for _ in range(10):
203-
time.sleep(0.1)
177+
while retry():
204178
# from v0.7.4 libtmux session.cmd adds target -t self.id by default
205179
# show-buffer doesn't accept -t, use global cmd.
206180

0 commit comments

Comments
 (0)