Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

libtmux.pytest_plugin.control_mode

Python
  • Python
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

View as Markdown

Module
libtmux.pytest_plugin
Package
libtmux
Source
src/libtmux/pytest_plugin.py
control_mode ( server : Server , session : Session ) → t.Callable[[], ControlMode]
function [source]
function [source]
control_mode

Return ControlMode context manager factory.

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 != ''

0 declared, 0 inherited

Esc

Type to search.