Skip to content

Commit 073214b

Browse files
committed
test(builder): show_window_option -> _show_option
1 parent 40af545 commit 073214b

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

tests/workspace/test_builder.py

+9-7
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ def test_focus_pane_index(session: Session) -> None:
9494

9595
assert session.active_window.name == "focused window"
9696

97-
_pane_base_index = session.active_window.show_window_option(
97+
_pane_base_index = session.active_window._show_option(
9898
"pane-base-index",
99-
g=True,
99+
_global=True,
100100
)
101101
assert isinstance(_pane_base_index, int)
102102
pane_base_index = int(_pane_base_index)
@@ -279,7 +279,7 @@ def test_global_session_env_options(
279279
assert isinstance(_visual_silence, bool)
280280
assert _visual_silence is True
281281
assert repeat_time == session._show_option("repeat-time")
282-
assert main_pane_height == session.active_window.show_window_option(
282+
assert main_pane_height == session.active_window._show_option(
283283
"main-pane-height",
284284
)
285285

@@ -306,9 +306,9 @@ def test_window_options(
306306
p = p
307307
assert len(session.windows) == window_count
308308
assert isinstance(w, Window)
309-
assert w.show_window_option("main-pane-height") == 5
309+
assert w._show_option("main-pane-height") == 5
310310
if has_gte_version("2.3"):
311-
assert w.show_window_option("pane-border-format") == " #P "
311+
assert w._show_option("pane-border-format") == " #P "
312312

313313
assert len(session.windows) == window_count
314314
window_count += 1
@@ -513,7 +513,7 @@ def check_window_name_mismatch() -> bool:
513513
assert retry_until(check_window_name_mismatch, 5, interval=0.25)
514514

515515
def check_window_name_match() -> bool:
516-
assert w.show_window_option("automatic-rename")
516+
assert w._show_option("automatic-rename")
517517
return w.name in {
518518
pathlib.Path(os.getenv("SHELL", "bash")).name,
519519
portable_command,
@@ -714,8 +714,10 @@ def test_pane_order(session: Session) -> None:
714714
window_count += 1
715715

716716
for w in session.windows:
717-
pane_base_index = w.show_window_option("pane-base-index", g=True)
717+
pane_base_index = w._show_option("pane-base-index", _global=True)
718+
assert isinstance(pane_base_index, int)
718719
for p_index, p in enumerate(w.panes, start=pane_base_index):
720+
assert p.index is not None
719721
assert int(p_index) == int(p.index)
720722

721723
# pane-base-index start at base-index, pane_paths always start

0 commit comments

Comments
 (0)