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 @@ -293,7 +293,10 @@ def test_set_and_show_options(session: Session) -> None:
293
293
294
294
window .set_option ("main-pane-height" , 40 )
295
295
assert window ._show_option ("main-pane-height" ) == 40
296
- assert window ._show_options ()["main-pane-height" ] == 40
296
+
297
+ # By default, show-options will session scope, even if target is a window
298
+ with pytest .raises (KeyError ):
299
+ assert window ._show_options ()["main-pane-height" ] == 40
297
300
298
301
if has_gte_version ("2.3" ):
299
302
window .set_option ("pane-border-format" , " #P " )
Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ def test_window_rename(
250
250
window_name_after : str ,
251
251
) -> None :
252
252
"""Test Window.rename_window()."""
253
- session .set_option ("automatic-rename" , "off" )
253
+ session .set_option ("automatic-rename" , "off" , scope = None )
254
254
window = session .new_window (window_name = window_name_before , attach = True )
255
255
256
256
assert window == session .active_window
@@ -331,7 +331,10 @@ def test_set_and_show_window_options(session: Session) -> None:
331
331
332
332
window .set_option ("main-pane-height" , 40 )
333
333
assert window ._show_option ("main-pane-height" ) == 40
334
- assert window ._show_options ()["main-pane-height" ] == 40
334
+
335
+ # By default, show-options will session scope, even if target is a window
336
+ with pytest .raises (KeyError ):
337
+ assert window ._show_options ()["main-pane-height" ] == 40
335
338
336
339
if has_gte_version ("2.3" ):
337
340
window .set_option ("pane-border-format" , " #P " )
You can’t perform that action at this time.
0 commit comments