libtmux.pytest_plugin.TestServer
Python
- Python
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust Unavailable
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- libtmux.pytest_plugin
- Package
- libtmux
- Source
- src/libtmux/pytest_plugin.py
-
Create a temporary tmux server that cleans up after itself.
This is similar to the server pytest fixture, but can be used outside of pytest. The server will be killed when the test completes.
Examples
>>> server = Server() # Create server instance>>> server.new_session()Session($... ...)>>> server.is_alive()True>>> # Each call creates a new server with unique socket>>> server2 = Server()>>> server2.socket_name != server.socket_nameTrue
0 declared, 0 inherited