@@ -275,19 +275,37 @@ def test_cmd_inserts_session_id(session: Session) -> None:
275
275
assert cmd .cmd [- 1 ] == last_arg
276
276
277
277
278
+ class SessionWindowEnvironmentFixture (t .NamedTuple ):
279
+ """Test fixture for window environment variables in sessions."""
280
+
281
+ test_id : str
282
+ environment : dict [str , str ]
283
+
284
+
285
+ SESSION_WINDOW_ENV_FIXTURES : list [SessionWindowEnvironmentFixture ] = [
286
+ SessionWindowEnvironmentFixture (
287
+ test_id = "single_env_var" ,
288
+ environment = {"ENV_VAR" : "window" },
289
+ ),
290
+ SessionWindowEnvironmentFixture (
291
+ test_id = "multiple_env_vars" ,
292
+ environment = {"ENV_VAR_1" : "window_1" , "ENV_VAR_2" : "window_2" },
293
+ ),
294
+ ]
295
+
296
+
278
297
@pytest .mark .skipif (
279
298
has_lt_version ("3.0" ),
280
299
reason = "needs -e flag for new-window which was introduced in 3.0" ,
281
300
)
282
301
@pytest .mark .parametrize (
283
- "environment" ,
284
- [
285
- {"ENV_VAR" : "window" },
286
- {"ENV_VAR_1" : "window_1" , "ENV_VAR_2" : "window_2" },
287
- ],
302
+ list (SessionWindowEnvironmentFixture ._fields ),
303
+ SESSION_WINDOW_ENV_FIXTURES ,
304
+ ids = [test .test_id for test in SESSION_WINDOW_ENV_FIXTURES ],
288
305
)
289
306
def test_new_window_with_environment (
290
307
session : Session ,
308
+ test_id : str ,
291
309
environment : dict [str , str ],
292
310
) -> None :
293
311
"""Verify new window with environment vars."""
0 commit comments