File tree Expand file tree Collapse file tree 3 files changed +8
-16
lines changed Expand file tree Collapse file tree 3 files changed +8
-16
lines changed Original file line number Diff line number Diff line change 3
3
from __future__ import annotations
4
4
5
5
import logging
6
- import os
7
6
import shutil
8
- import time
9
7
import typing as t
10
8
11
9
import pytest
12
10
13
11
from libtmux import exc
12
+ from libtmux ._internal .waiter import wait_until_pane_ready
14
13
from libtmux .common import has_gte_version , has_lt_version , has_version
15
14
from libtmux .pane import Pane
16
15
from libtmux .server import Server
17
16
from libtmux .session import Session
18
17
from libtmux .window import Window
19
- from libtmux ._internal .waiter import expect , wait_until_pane_ready
20
18
21
19
if t .TYPE_CHECKING :
22
20
from libtmux .session import Session
@@ -417,10 +415,10 @@ def test_split_window_with_environment(
417
415
environment = environment ,
418
416
)
419
417
assert pane is not None
420
-
418
+
421
419
# Wait for shell prompt to be ready using waiter
422
420
wait_until_pane_ready (pane )
423
-
421
+
424
422
for k , v in environment .items ():
425
423
pane .send_keys (f"echo ${ k } " )
426
424
assert pane .capture_pane ()[- 2 ] == v
Original file line number Diff line number Diff line change 8
8
9
9
import pytest
10
10
11
+ from libtmux ._internal .waiter import expect
11
12
from libtmux .common import has_gte_version , has_lt_version , has_lte_version
12
13
from libtmux .constants import PaneDirection , ResizeAdjustmentDirection
13
- from libtmux .test .retry import retry_until
14
- from libtmux ._internal .waiter import expect
15
14
16
15
if t .TYPE_CHECKING :
17
16
from libtmux .session import Session
@@ -109,9 +108,7 @@ def test_capture_pane_start(session: Session) -> None:
109
108
pane .send_keys ("clear -x" , literal = True , suppress_history = False )
110
109
111
110
# Using the waiter functionality to wait for the pane to be cleared
112
- expect (pane ).wait_for_predicate (
113
- lambda lines : "clear -x" not in "\n " .join (lines )
114
- )
111
+ expect (pane ).wait_for_predicate (lambda lines : "clear -x" not in "\n " .join (lines ))
115
112
116
113
# Using the waiter functionality to wait for shell prompt
117
114
expect (pane ).wait_for_exact_text ("$" )
Original file line number Diff line number Diff line change 4
4
5
5
import logging
6
6
import shutil
7
- import time
8
7
import typing as t
9
- import os
10
- from dataclasses import astuple , dataclass
11
8
12
9
import pytest
13
10
14
11
from libtmux import exc
15
12
from libtmux ._internal .query_list import ObjectDoesNotExist
13
+ from libtmux ._internal .waiter import wait_until_pane_ready
16
14
from libtmux .common import has_gte_version , has_lt_version , has_lte_version
17
15
from libtmux .constants import (
18
16
PaneDirection ,
23
21
from libtmux .server import Server
24
22
from libtmux .session import Session
25
23
from libtmux .window import Window
26
- from libtmux ._internal .waiter import expect , wait_until_pane_ready
27
24
28
25
if t .TYPE_CHECKING :
29
26
from libtmux .session import Session
@@ -452,10 +449,10 @@ def test_split_with_environment(
452
449
environment = environment ,
453
450
)
454
451
assert pane is not None
455
-
452
+
456
453
# Wait for shell prompt to be ready using waiter
457
454
wait_until_pane_ready (pane )
458
-
455
+
459
456
for k , v in environment .items ():
460
457
pane .send_keys (f"echo ${ k } " )
461
458
assert pane .capture_pane ()[- 2 ] == v
You can’t perform that action at this time.
0 commit comments