Skip to content

Commit 00c13b5

Browse files
committed
docs(doctests): annotate untestable interactive commands
why: display_menu, display_popup, and display_message have paths that require TTY-backed clients or render in the status line, making them not programmatically verifiable. Adding explicit notes prevents false positives from agents and reviewers. what: - Add "Not directly testable" note to display_menu doctest - Add "Not directly testable" note to display_popup doctest - Add note about get_text=False path in display_message docstring
1 parent 4e06b4d commit 00c13b5

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/libtmux/pane.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,8 @@ def display_message(
621621
"""Display message to pane.
622622
623623
Displays a message in target-client status line.
624+
The ``get_text=False`` path renders in the status line and is not
625+
programmatically verifiable; only ``get_text=True`` returns output.
624626
625627
Parameters
626628
----------
@@ -1192,6 +1194,10 @@ def display_popup(
11921194
11931195
Examples
11941196
--------
1197+
Not directly testable — popup rendering requires a TTY-backed client.
1198+
Control-mode provides an attached client for invocation but the popup
1199+
itself is not visible or verifiable.
1200+
11951201
>>> with control_mode() as ctl:
11961202
... pane.display_popup(command='true', close_on_exit=True)
11971203
"""

src/libtmux/server.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,10 @@ def display_menu(
10191019
10201020
Examples
10211021
--------
1022+
Not directly testable — requires a TTY-backed client.
1023+
Control-mode clients set ``tty.sy=0``, causing ``menu_prepare()``
1024+
to return NULL inside tmux.
1025+
10221026
>>> server.display_menu # doctest: +ELLIPSIS
10231027
<bound method ...>
10241028
"""

0 commit comments

Comments
 (0)