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 33from __future__ import annotations
44
55import logging
6- import os
76import shutil
8- import time
97import typing as t
108
119import pytest
1210
1311from libtmux import exc
12+ from libtmux ._internal .waiter import wait_until_pane_ready
1413from libtmux .common import has_gte_version , has_lt_version , has_version
1514from libtmux .pane import Pane
1615from libtmux .server import Server
1716from libtmux .session import Session
1817from libtmux .window import Window
19- from libtmux ._internal .waiter import expect , wait_until_pane_ready
2018
2119if t .TYPE_CHECKING :
2220 from libtmux .session import Session
@@ -417,10 +415,10 @@ def test_split_window_with_environment(
417415 environment = environment ,
418416 )
419417 assert pane is not None
420-
418+
421419 # Wait for shell prompt to be ready using waiter
422420 wait_until_pane_ready (pane )
423-
421+
424422 for k , v in environment .items ():
425423 pane .send_keys (f"echo ${ k } " )
426424 assert pane .capture_pane ()[- 2 ] == v
Original file line number Diff line number Diff line change 88
99import pytest
1010
11+ from libtmux ._internal .waiter import expect
1112from libtmux .common import has_gte_version , has_lt_version , has_lte_version
1213from libtmux .constants import PaneDirection , ResizeAdjustmentDirection
13- from libtmux .test .retry import retry_until
14- from libtmux ._internal .waiter import expect
1514
1615if t .TYPE_CHECKING :
1716 from libtmux .session import Session
@@ -109,9 +108,7 @@ def test_capture_pane_start(session: Session) -> None:
109108 pane .send_keys ("clear -x" , literal = True , suppress_history = False )
110109
111110 # 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 ))
115112
116113 # Using the waiter functionality to wait for shell prompt
117114 expect (pane ).wait_for_exact_text ("$" )
Original file line number Diff line number Diff line change 44
55import logging
66import shutil
7- import time
87import typing as t
9- import os
10- from dataclasses import astuple , dataclass
118
129import pytest
1310
1411from libtmux import exc
1512from libtmux ._internal .query_list import ObjectDoesNotExist
13+ from libtmux ._internal .waiter import wait_until_pane_ready
1614from libtmux .common import has_gte_version , has_lt_version , has_lte_version
1715from libtmux .constants import (
1816 PaneDirection ,
2321from libtmux .server import Server
2422from libtmux .session import Session
2523from libtmux .window import Window
26- from libtmux ._internal .waiter import expect , wait_until_pane_ready
2724
2825if t .TYPE_CHECKING :
2926 from libtmux .session import Session
@@ -452,10 +449,10 @@ def test_split_with_environment(
452449 environment = environment ,
453450 )
454451 assert pane is not None
455-
452+
456453 # Wait for shell prompt to be ready using waiter
457454 wait_until_pane_ready (pane )
458-
455+
459456 for k , v in environment .items ():
460457 pane .send_keys (f"echo ${ k } " )
461458 assert pane .capture_pane ()[- 2 ] == v
You can’t perform that action at this time.
0 commit comments