Skip to content

Commit 8c038bd

Browse files
committed
chore(tests[window]): pydocstyle manual fixes
1 parent 8775e3e commit 8c038bd

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/test_window.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919

2020
def test_select_window(session: Session) -> None:
21+
"""Test Window.select_window()."""
2122
window_count = len(session.windows)
2223
# to do, get option for base-index from tmux
2324
# for now however, let's get the index from the first window.
@@ -43,7 +44,8 @@ def test_select_window(session: Session) -> None:
4344
assert len(session.windows) == 2
4445

4546

46-
def test_zfresh_window_data(session: Session) -> None:
47+
def test_fresh_window_data(session: Session) -> None:
48+
"""Verify window data is fresh."""
4749
attached_window = session.attached_window
4850
assert attached_window is not None
4951
pane_base_idx = attached_window.show_window_option("pane-base-index", g=True)
@@ -96,6 +98,7 @@ def test_zfresh_window_data(session: Session) -> None:
9698

9799

98100
def test_newest_pane_data(session: Session) -> None:
101+
"""Test window.panes has fresh data."""
99102
window = session.new_window(window_name="test", attach=True)
100103
assert isinstance(window, Window)
101104
assert len(window.panes) == 1
@@ -174,7 +177,7 @@ def test_split_window_horizontal(session: Session) -> None:
174177
def test_window_rename(
175178
session: Session, window_name_before: str, window_name_after: str
176179
) -> None:
177-
"""Window.rename_window()."""
180+
"""Test Window.rename_window()."""
178181
window_name_before = "test"
179182
window_name_after = "ha ha ha fjewlkjflwef"
180183

@@ -196,6 +199,7 @@ def test_window_rename(
196199

197200

198201
def test_kill_window(session: Session) -> None:
202+
"""Test window.kill_window() kills window."""
199203
session.new_window()
200204
# create a second window to not kick out the client.
201205
# there is another way to do this via options too.
@@ -234,6 +238,7 @@ def test_set_show_window_options(session: Session) -> None:
234238

235239

236240
def test_empty_window_option_returns_None(session: Session) -> None:
241+
"""Verify unset window option returns None."""
237242
window = session.new_window(window_name="test_window")
238243
assert window.show_window_option("alternate-screen") is None
239244

@@ -299,6 +304,7 @@ def test_move_window(session: Session) -> None:
299304

300305

301306
def test_move_window_to_other_session(server: Server, session: Session) -> None:
307+
"""Window.move_window to other session."""
302308
window = session.new_window(window_name="test_window")
303309
new_session = server.new_session("test_move_window")
304310
window.move_window(session=new_session.session_id)
@@ -317,6 +323,7 @@ def test_select_layout_accepts_no_arg(server: Server, session: Session) -> None:
317323
has_lt_version("3.2"), reason="needs filter introduced in tmux >= 3.2"
318324
)
319325
def test_empty_window_name(session: Session) -> None:
326+
"""New windows can be created with empty string for window name."""
320327
session.set_option("automatic-rename", "off")
321328
window = session.new_window(window_name="''", attach=True)
322329

@@ -349,6 +356,7 @@ def test_split_window_with_environment(
349356
session: Session,
350357
environment: t.Dict[str, str],
351358
) -> None:
359+
"""Verify splitting window with environment variables."""
352360
env = shutil.which("env")
353361
assert env is not None, "Cannot find usable `env` in Path."
354362

@@ -373,6 +381,7 @@ def test_split_window_with_environment_logs_warning_for_old_tmux(
373381
session: Session,
374382
caplog: pytest.LogCaptureFixture,
375383
) -> None:
384+
"""Verify splitting window with environment variables warns if tmux too old."""
376385
env = shutil.which("env")
377386
assert env is not None, "Cannot find usable `env` in Path."
378387

0 commit comments

Comments
 (0)