@@ -140,6 +140,7 @@ def test_set_show_option(session: Session) -> None:
140140
141141
142142def test_empty_session_option_returns_None (session : Session ) -> None :
143+ """Verify Session.show_option returns None for unset option."""
143144 assert session .show_option ("default-shell" ) is None
144145
145146
@@ -215,6 +216,8 @@ def test_unset_environment(session: Session) -> None:
215216
216217
217218class PeriodRaisesBadSessionName (t .NamedTuple ):
219+ """Test fixture for bad session name names."""
220+
218221 session_name : str
219222 raises : bool
220223
@@ -227,9 +230,10 @@ class PeriodRaisesBadSessionName(t.NamedTuple):
227230 PeriodRaisesBadSessionName ("hey moo" , False ),
228231 ],
229232)
230- def test_periods_raise_badsessionname (
233+ def test_periods_raise_bad_session_name (
231234 server : Server , session : Session , session_name : str , raises : bool
232235) -> None :
236+ """Verify session names with periods raise BadSessionName."""
233237 new_name = session_name + "moo" # used for rename / switch
234238 if raises :
235239 with pytest .raises (exc .BadSessionName ):
@@ -256,6 +260,7 @@ def test_periods_raise_badsessionname(
256260
257261
258262def test_cmd_inserts_session_id (session : Session ) -> None :
263+ """Verify Session.cmd() inserts session_id."""
259264 current_session_id = session .session_id
260265 last_arg = "last-arg"
261266 cmd = session .cmd ("not-a-command" , last_arg )
@@ -279,6 +284,7 @@ def test_new_window_with_environment(
279284 session : Session ,
280285 environment : t .Dict [str , str ],
281286) -> None :
287+ """Verify new window with environment vars."""
282288 env = shutil .which ("env" )
283289 assert env is not None , "Cannot find usable `env` in PATH."
284290
@@ -303,6 +309,7 @@ def test_new_window_with_environment_logs_warning_for_old_tmux(
303309 session : Session ,
304310 caplog : pytest .LogCaptureFixture ,
305311) -> None :
312+ """Verify new window with environment vars create a warning if tmux is too old."""
306313 env = shutil .which ("env" )
307314 assert env is not None , "Cannot find usable `env` in PATH."
308315
0 commit comments