@@ -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
@@ -215,6 +216,8 @@ def test_unset_environment(session: Session) -> None:
215
216
216
217
217
218
class PeriodRaisesBadSessionName (t .NamedTuple ):
219
+ """Test fixture for bad session name names."""
220
+
218
221
session_name : str
219
222
raises : bool
220
223
@@ -227,9 +230,10 @@ class PeriodRaisesBadSessionName(t.NamedTuple):
227
230
PeriodRaisesBadSessionName ("hey moo" , False ),
228
231
],
229
232
)
230
- def test_periods_raise_badsessionname (
233
+ def test_periods_raise_bad_session_name (
231
234
server : Server , session : Session , session_name : str , raises : bool
232
235
) -> None :
236
+ """Verify session names with periods raise BadSessionName."""
233
237
new_name = session_name + "moo" # used for rename / switch
234
238
if raises :
235
239
with pytest .raises (exc .BadSessionName ):
@@ -256,6 +260,7 @@ def test_periods_raise_badsessionname(
256
260
257
261
258
262
def test_cmd_inserts_session_id (session : Session ) -> None :
263
+ """Verify Session.cmd() inserts session_id."""
259
264
current_session_id = session .session_id
260
265
last_arg = "last-arg"
261
266
cmd = session .cmd ("not-a-command" , last_arg )
@@ -279,6 +284,7 @@ def test_new_window_with_environment(
279
284
session : Session ,
280
285
environment : t .Dict [str , str ],
281
286
) -> None :
287
+ """Verify new window with environment vars."""
282
288
env = shutil .which ("env" )
283
289
assert env is not None , "Cannot find usable `env` in PATH."
284
290
@@ -303,6 +309,7 @@ def test_new_window_with_environment_logs_warning_for_old_tmux(
303
309
session : Session ,
304
310
caplog : pytest .LogCaptureFixture ,
305
311
) -> None :
312
+ """Verify new window with environment vars create a warning if tmux is too old."""
306
313
env = shutil .which ("env" )
307
314
assert env is not None , "Cannot find usable `env` in PATH."
308
315
0 commit comments