@@ -386,10 +386,6 @@ def f(w: Window) -> bool:
386386 assert w .name != "top"
387387
388388
389- @pytest .mark .skipif (
390- has_lt_version ("3.0" ),
391- reason = "needs -e flag for new-window and split-window introduced in tmux 3.0" ,
392- )
393389def test_environment_variables (
394390 session : Session ,
395391) -> None :
@@ -431,58 +427,6 @@ def test_environment_variables(
431427 assert pane .capture_pane ()[1 ] == "PANE"
432428
433429
434- @pytest .mark .skipif (
435- has_gte_version ("3.0" ),
436- reason = "warnings are not needed for tmux >= 3.0" ,
437- )
438- def test_environment_variables_warns_prior_to_tmux_3_0 (
439- session : Session ,
440- caplog : pytest .LogCaptureFixture ,
441- ) -> None :
442- """Warns when environmental variables cannot be set prior to tmux 3.0."""
443- workspace = ConfigReader ._from_file (
444- test_utils .get_workspace_file ("workspace/builder/environment_vars.yaml" ),
445- )
446- workspace = loader .expand (workspace )
447-
448- builder = WorkspaceBuilder (session_config = workspace , server = session .server )
449- builder .build (session )
450-
451- # environment on sessions should work as this is done using set-environment
452- # on the session itself
453- assert session .getenv ("FOO" ) == "SESSION"
454- assert session .getenv ("PATH" ) == "/tmp"
455-
456- assert (
457- sum (
458- 1
459- for record in caplog .records
460- if "Cannot set environment for new windows." in record .message
461- )
462- # From window_overrides and both_overrides, but not
463- # both_overrides_in_first_pane.
464- == 2
465- ), "Warning on creating windows missing"
466- assert (
467- sum (
468- 1
469- for record in caplog .records
470- if "Cannot set environment for new panes." in record .message
471- )
472- # From pane_overrides and both_overrides, but not both_overrides_in_first_pane.
473- == 2
474- ), "Warning on creating panes missing"
475- assert (
476- sum (
477- 1
478- for record in caplog .records
479- if "Cannot set environment for new panes and windows." in record .message
480- )
481- # From both_overrides_in_first_pane.
482- == 1
483- )
484-
485-
486430def test_automatic_rename_option (
487431 server : Server ,
488432 monkeypatch : pytest .MonkeyPatch ,
0 commit comments