Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

function libtmux latest

control_mode

Return ControlMode context manager factory.

Source and package
Qualified name
libtmux.pytest_plugin.control_mode
Module
libtmux.pytest_plugin
Package
libtmux
Source
src/libtmux/pytest_plugin.py

Description#

Returns a callable that creates ControlMode context managers bound to the test's server and session. Use as a context manager to spawn a control-mode tmux client.

While the control-mode client is active, Server.list_clients() will include it.

Examples#

>>> from libtmux._internal.control_mode import ControlMode
>>> def test_example(control_mode):
... with control_mode() as ctl:
... assert ctl.client_name != ''
Parameters
Esc

Type to search.

Reference previewOpen reference