Skip to content

Commit 7a484ea

Browse files
committed
docs: Improve pytest_plugin.py
1 parent 17d6435 commit 7a484ea

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

src/libtmux/pytest_plugin.py

+17-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
"""libtmux pytest plugin."""
1+
"""Provide a pytest plugin that supplies libtmux testing fixtures.
2+
3+
This plugin integrates with pytest to offer session, window, and environment
4+
fixtures tailored for tmux-based tests. It ensures stable test environments by
5+
creating and tearing down temporary sessions and windows for each test as
6+
needed.
7+
8+
Notes
9+
-----
10+
The existing doctests embedded within each fixture are preserved to maintain
11+
clarity and verify core behaviors.
12+
13+
"""
214

315
from __future__ import annotations
416

@@ -66,7 +78,8 @@ def config_file(user_path: pathlib.Path) -> pathlib.Path:
6678
6779
- ``base-index -g 1``
6880
69-
These guarantee pane and windows targets can be reliably referenced and asserted.
81+
These guarantee pane and windows targets can be reliably referenced
82+
and asserted.
7083
7184
Note: You will need to set the home directory, see :ref:`set_home`.
7285
"""
@@ -84,7 +97,8 @@ def config_file(user_path: pathlib.Path) -> pathlib.Path:
8497
def clear_env(monkeypatch: pytest.MonkeyPatch) -> None:
8598
"""Clear out any unnecessary environment variables that could interrupt tests.
8699
87-
tmux show-environment tests were being interrupted due to a lot of crazy env vars.
100+
tmux show-environment tests were being interrupted due to a lot of
101+
crazy env vars.
88102
"""
89103
for k in os.environ:
90104
if not any(

0 commit comments

Comments
 (0)