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 @@ -289,7 +289,10 @@ def test_set_and_show_options(session: Session) -> None:
289289
290290 window .set_option ("main-pane-height" , 40 )
291291 assert window ._show_option ("main-pane-height" ) == 40
292- assert window ._show_options ()["main-pane-height" ] == 40
292+
293+ # By default, show-options will session scope, even if target is a window
294+ with pytest .raises (KeyError ):
295+ assert window ._show_options ()["main-pane-height" ] == 40
293296
294297 if has_gte_version ("2.3" ):
295298 window .set_option ("pane-border-format" , " #P " )
Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ def test_window_rename(
221221 window_name_before = "test"
222222 window_name_after = "ha ha ha fjewlkjflwef"
223223
224- session .set_option ("automatic-rename" , "off" )
224+ session .set_option ("automatic-rename" , "off" , scope = None )
225225 window = session .new_window (window_name = window_name_before , attach = True )
226226
227227 assert window == session .active_window
@@ -307,7 +307,10 @@ def test_set_and_show_window_options(session: Session) -> None:
307307
308308 window .set_option ("main-pane-height" , 40 )
309309 assert window ._show_option ("main-pane-height" ) == 40
310- assert window ._show_options ()["main-pane-height" ] == 40
310+
311+ # By default, show-options will session scope, even if target is a window
312+ with pytest .raises (KeyError ):
313+ assert window ._show_options ()["main-pane-height" ] == 40
311314
312315 if has_gte_version ("2.3" ):
313316 window .set_option ("pane-border-format" , " #P " )
You can’t perform that action at this time.
0 commit comments