Skip to content

Commit ffcaa49

Browse files
committed
fix(tests): handle update-environment version compatibility
WHAT: - Add version check for update-environment option (added in tmux 3.0) - Update test assertions to handle version-specific behavior - Add type checking for update-environment value WHY: - Ensure tests pass on older tmux versions - Properly handle version-specific options - Improve test robustness across tmux versions
1 parent f70e760 commit ffcaa49

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/test_options.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,13 @@ def test_stable_baseline_options_and_hooks(server: Server) -> None:
507507
with pytest.raises(OptionError):
508508
server.show_option("status-format")
509509

510-
assert server.show_option("update-environment") is None
510+
# update-environment was added in tmux 3.0
511+
if has_gte_version("3.0"):
512+
update_env = server.show_option("update-environment")
513+
assert isinstance(update_env, (list, type(None)))
514+
else:
515+
with pytest.raises(OptionError):
516+
server.show_option("update-environment")
511517

512518
# List variables: Pane
513519
pane = session.active_pane

0 commit comments

Comments
 (0)