11
11
12
12
import pytest
13
13
14
- from libtmux .exc import WaitTimeout
15
- from libtmux .test .waiter import (
14
+ from libtmux ._internal .waiter import (
16
15
ContentMatchType ,
17
16
PaneContentWaiter ,
18
17
_contains_match ,
28
27
wait_for_window_panes ,
29
28
wait_until_pane_ready ,
30
29
)
30
+ from libtmux .exc import WaitTimeout
31
31
32
32
if TYPE_CHECKING :
33
33
from libtmux .pane import Pane
@@ -1352,7 +1352,7 @@ def test_wait_for_pane_content_exception_handling(
1352
1352
This tests how wait_for_pane_content handles exceptions raised during
1353
1353
the content checking process.
1354
1354
"""
1355
- import libtmux .test .waiter
1355
+ import libtmux ._internal .waiter
1356
1356
1357
1357
# Use monkeypatch to replace the retry_until_extended function
1358
1358
def mock_retry_value_error (
@@ -1363,7 +1363,7 @@ def mock_retry_value_error(
1363
1363
1364
1364
# Patch first scenario - ValueError
1365
1365
monkeypatch .setattr (
1366
- libtmux .test .waiter ,
1366
+ libtmux ._internal .waiter ,
1367
1367
"retry_until_extended" ,
1368
1368
mock_retry_value_error ,
1369
1369
)
@@ -1389,7 +1389,7 @@ def mock_retry_timeout(*args: object, **kwargs: object) -> tuple[bool, Exception
1389
1389
1390
1390
# Patch second scenario - WaitTimeout
1391
1391
monkeypatch .setattr (
1392
- libtmux .test .waiter ,
1392
+ libtmux ._internal .waiter ,
1393
1393
"retry_until_extended" ,
1394
1394
mock_retry_timeout ,
1395
1395
)
@@ -1416,7 +1416,7 @@ def mock_retry_raise(*args: object, **kwargs: object) -> tuple[bool, Exception]:
1416
1416
1417
1417
# Patch third scenario - raising exception
1418
1418
monkeypatch .setattr (
1419
- libtmux .test .waiter ,
1419
+ libtmux ._internal .waiter ,
1420
1420
"retry_until_extended" ,
1421
1421
mock_retry_raise ,
1422
1422
)
@@ -1656,8 +1656,8 @@ def test_wait_for_all_content_timeout_exception(
1656
1656
This test specifically targets the exception handling in lines 1069, 1077-1078.
1657
1657
"""
1658
1658
# Import the module directly
1659
- import libtmux .test .waiter
1660
- from libtmux .test .waiter import WaitResult
1659
+ import libtmux ._internal .waiter
1660
+ from libtmux ._internal .waiter import WaitResult
1661
1661
1662
1662
# Mock the retry_until_extended function to simulate a WaitTimeout
1663
1663
def mock_retry_timeout (* args : object , ** kwargs : object ) -> tuple [bool , Exception ]:
@@ -1677,7 +1677,7 @@ def mock_retry_timeout(*args: object, **kwargs: object) -> tuple[bool, Exception
1677
1677
1678
1678
# Apply the patch
1679
1679
monkeypatch .setattr (
1680
- libtmux .test .waiter ,
1680
+ libtmux ._internal .waiter ,
1681
1681
"retry_until_extended" ,
1682
1682
mock_retry_timeout ,
1683
1683
)
@@ -1834,7 +1834,7 @@ def test_wait_for_pane_content_specific_type_errors(wait_pane: Pane) -> None:
1834
1834
various type error conditions in different match types.
1835
1835
"""
1836
1836
# Import error message constants from the module
1837
- from libtmux .test .waiter import (
1837
+ from libtmux ._internal .waiter import (
1838
1838
ERR_CONTAINS_TYPE ,
1839
1839
ERR_EXACT_TYPE ,
1840
1840
ERR_PREDICATE_TYPE ,
0 commit comments