libtmux.pytest_plugin._reap_test_server
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
-
Kill the tmux daemon on
socket_nameand unlink the socket file.Invoked from the
serverandTestServerfixture finalizers to guarantee teardown even when the daemon has already exited (killis a no-op then) and the socket file was left on disk. tmux does not reliablyunlink(2)its socket on non-graceful exit, so/tmp/tmux-<uid>/otherwise accumulates stale entries across test runs.Conservative: suppresses
LibTmuxException/OSErroron both the kill and the unlink. A finalizer that raises replaces the real test failure with a cleanup error, and cleanup failures are not actionable (socket already gone, permissions changed, race with a concurrent pytest-xdist worker).
0 declared, 0 inherited