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:
289
289
290
290
window .set_option ("main-pane-height" , 40 )
291
291
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
293
296
294
297
if has_gte_version ("2.3" ):
295
298
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(
221
221
window_name_before = "test"
222
222
window_name_after = "ha ha ha fjewlkjflwef"
223
223
224
- session .set_option ("automatic-rename" , "off" )
224
+ session .set_option ("automatic-rename" , "off" , scope = None )
225
225
window = session .new_window (window_name = window_name_before , attach = True )
226
226
227
227
assert window == session .active_window
@@ -307,7 +307,10 @@ def test_set_and_show_window_options(session: Session) -> None:
307
307
308
308
window .set_option ("main-pane-height" , 40 )
309
309
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
311
314
312
315
if has_gte_version ("2.3" ):
313
316
window .set_option ("pane-border-format" , " #P " )
You can’t perform that action at this time.
0 commit comments