@@ -140,6 +140,7 @@ def test_set_show_option(session: Session) -> None:
140
140
141
141
142
142
def test_empty_session_option_returns_None (session : Session ) -> None :
143
+ """Verify Session.show_option returns None for unset option."""
143
144
assert session .show_option ("default-shell" ) is None
144
145
145
146
@@ -221,6 +222,7 @@ def test_unset_environment(session: Session) -> None:
221
222
def test_periods_raise_badsessionname (
222
223
server : Server , session : Session , session_name : str , raises : bool
223
224
) -> None :
225
+ """Verify session names with periods raise BadSessionName."""
224
226
new_name = session_name + "moo" # used for rename / switch
225
227
if raises :
226
228
with pytest .raises (exc .BadSessionName ):
@@ -247,6 +249,7 @@ def test_periods_raise_badsessionname(
247
249
248
250
249
251
def test_cmd_inserts_session_id (session : Session ) -> None :
252
+ """Verify Session.cmd() inserts session_id."""
250
253
current_session_id = session .id
251
254
last_arg = "last-arg"
252
255
cmd = session .cmd ("not-a-command" , last_arg )
@@ -270,6 +273,7 @@ def test_new_window_with_environment(
270
273
session : Session ,
271
274
environment : t .Dict [str , str ],
272
275
) -> None :
276
+ """Verify new window with environment vars."""
273
277
env = shutil .which ("env" )
274
278
assert env is not None , "Cannot find usable `env` in PATH."
275
279
@@ -294,6 +298,7 @@ def test_new_window_with_environment_logs_warning_for_old_tmux(
294
298
session : Session ,
295
299
caplog : pytest .LogCaptureFixture ,
296
300
) -> None :
301
+ """Verify new window with environment vars create a warning if tmux is too old."""
297
302
env = shutil .which ("env" )
298
303
assert env is not None , "Cannot find usable `env` in PATH."
299
304
0 commit comments