1717
1818
1919def test_select_window (session : Session ) -> None :
20+ """Test Window.select_window()."""
2021 window_count = len (session ._windows )
2122 # to do, get option for base-index from tmux
2223 # for now however, let's get the index from the first window.
@@ -42,7 +43,8 @@ def test_select_window(session: Session) -> None:
4243 assert len (session ._windows ) == 2
4344
4445
45- def test_zfresh_window_data (session : Session ) -> None :
46+ def test_fresh_window_data (session : Session ) -> None :
47+ """Verify window data is fresh."""
4648 attached_window = session .attached_window
4749 assert attached_window is not None
4850 pane_base_idx = attached_window .show_window_option ("pane-base-index" , g = True )
@@ -95,6 +97,7 @@ def test_zfresh_window_data(session: Session) -> None:
9597
9698
9799def test_newest_pane_data (session : Session ) -> None :
100+ """Test window.panes has fresh data."""
98101 window = session .new_window (window_name = "test" , attach = True )
99102 assert isinstance (window , Window )
100103 assert len (window .panes ) == 1
@@ -161,7 +164,7 @@ def test_split_window_horizontal(session: Session) -> None:
161164def test_window_rename (
162165 session : Session , window_name_before : str , window_name_after : str
163166) -> None :
164- """Window.rename_window()."""
167+ """Test Window.rename_window()."""
165168 window_name_before = "test"
166169 window_name_after = "ha ha ha fjewlkjflwef"
167170
@@ -183,6 +186,7 @@ def test_window_rename(
183186
184187
185188def test_kill_window (session : Session ) -> None :
189+ """Test window.kill_window() kills window."""
186190 session .new_window ()
187191 # create a second window to not kick out the client.
188192 # there is another way to do this via options too.
@@ -222,6 +226,7 @@ def test_set_show_window_options(session: Session) -> None:
222226
223227
224228def test_empty_window_option_returns_None (session : Session ) -> None :
229+ """Verify unset window option returns None."""
225230 window = session .new_window (window_name = "test_window" )
226231 assert window .show_window_option ("alternate-screen" ) is None
227232
@@ -287,6 +292,7 @@ def test_move_window(session: Session) -> None:
287292
288293
289294def test_move_window_to_other_session (server : Server , session : Session ) -> None :
295+ """Window.move_window to other session."""
290296 window = session .new_window (window_name = "test_window" )
291297 new_session = server .new_session ("test_move_window" )
292298 window .move_window (session = new_session .get ("session_id" ))
@@ -305,6 +311,7 @@ def test_select_layout_accepts_no_arg(server: Server, session: Session) -> None:
305311 has_lt_version ("3.2" ), reason = "needs filter introduced in tmux >= 3.2"
306312)
307313def test_empty_window_name (session : Session ) -> None :
314+ """New windows can be created with empty string for window name."""
308315 session .set_option ("automatic-rename" , "off" )
309316 window = session .new_window (window_name = "''" , attach = True )
310317
@@ -337,6 +344,7 @@ def test_split_window_with_environment(
337344 session : Session ,
338345 environment : t .Dict [str , str ],
339346) -> None :
347+ """Verify splitting window with environment variables."""
340348 env = shutil .which ("env" )
341349 assert env is not None , "Cannot find usable `env` in Path."
342350
@@ -361,6 +369,7 @@ def test_split_window_with_environment_logs_warning_for_old_tmux(
361369 session : Session ,
362370 caplog : pytest .LogCaptureFixture ,
363371) -> None :
372+ """Verify splitting window with environment variables warns if tmux too old."""
364373 env = shutil .which ("env" )
365374 assert env is not None , "Cannot find usable `env` in Path."
366375
0 commit comments