Skip to content

Commit 987ac0b

Browse files
committed
tests(Server): Add doctests
1 parent 4d63a45 commit 987ac0b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

libtmux/server.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,23 @@ class Server(TmuxRelationalObject["Session", "SessionDict"], EnvironmentMixin):
4747
config_file : str, optional
4848
colors : str, optional
4949
50+
Examples
51+
--------
52+
>>> server
53+
<libtmux.server.Server object at ...>
54+
55+
>>> server.sessions
56+
[Session($1 ...)]
57+
58+
>>> server.sessions[0].windows
59+
[Window(@1 ...:..., Session($1 ...)]
60+
61+
>>> server.sessions[0].attached_window
62+
Window(@1 ...:..., Session($1 ...)
63+
64+
>>> server.sessions[0].attached_pane
65+
Pane(%1 Window(@1 ...:..., Session($1 ...)))
66+
5067
References
5168
----------
5269
.. [server_manual] CLIENTS AND SESSIONS. openbsd manpage for TMUX(1)

0 commit comments

Comments
 (0)