File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -288,7 +288,10 @@ def test_set_and_show_options(session: Session) -> None:
288288
289289 window .set_option ("main-pane-height" , 40 )
290290 assert window ._show_option ("main-pane-height" ) == 40
291- assert window ._show_options ()["main-pane-height" ] == 40
291+
292+ # By default, show-options will session scope, even if target is a window
293+ with pytest .raises (KeyError ):
294+ assert window ._show_options ()["main-pane-height" ] == 40
292295
293296 if has_gte_version ("2.3" ):
294297 window .set_option ("pane-border-format" , " #P " )
Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ def test_window_rename(
220220 window_name_before = "test"
221221 window_name_after = "ha ha ha fjewlkjflwef"
222222
223- session .set_option ("automatic-rename" , "off" )
223+ session .set_option ("automatic-rename" , "off" , scope = None )
224224 window = session .new_window (window_name = window_name_before , attach = True )
225225
226226 assert window == session .active_window
@@ -306,7 +306,10 @@ def test_set_and_show_window_options(session: Session) -> None:
306306
307307 window .set_option ("main-pane-height" , 40 )
308308 assert window ._show_option ("main-pane-height" ) == 40
309- assert window ._show_options ()["main-pane-height" ] == 40
309+
310+ # By default, show-options will session scope, even if target is a window
311+ with pytest .raises (KeyError ):
312+ assert window ._show_options ()["main-pane-height" ] == 40
310313
311314 if has_gte_version ("2.3" ):
312315 window .set_option ("pane-border-format" , " #P " )
You can’t perform that action at this time.
0 commit comments