|
11 | 11 |
|
12 | 12 | from libtmux import exc |
13 | 13 | from libtmux.common import has_gte_version, has_version |
14 | | -from libtmux.constants import OptionScope |
15 | 14 | from libtmux.pane import Pane |
16 | 15 | from libtmux.server import Server |
17 | 16 | from libtmux.window import Window |
@@ -285,44 +284,6 @@ def test_set_window_and_show_window_options(session: Session) -> None: |
285 | 284 | assert window.show_window_option("pane-border-format") == " #P " |
286 | 285 |
|
287 | 286 |
|
288 | | -def test_set_and_show_options(session: Session) -> None: |
289 | | - """Window.set_option() then Window._show_options(key).""" |
290 | | - window = session.new_window(window_name="test_window") |
291 | | - |
292 | | - window.set_option("main-pane-height", 20) |
293 | | - if has_gte_version("3.0"): |
294 | | - assert window._show_option("main-pane-height") == 20 |
295 | | - else: |
296 | | - assert window._show_option("main-pane-height", scope=OptionScope.Window) == 20 |
297 | | - |
298 | | - window.set_option("main-pane-height", 40) |
299 | | - |
300 | | - if has_gte_version("3.0"): |
301 | | - assert window._show_option("main-pane-height") == 40 |
302 | | - else: |
303 | | - assert window._show_option("main-pane-height", scope=OptionScope.Window) == 40 |
304 | | - |
305 | | - # By default, show-options will session scope, even if target is a window |
306 | | - with pytest.raises(KeyError): |
307 | | - assert window._show_options(scope=OptionScope.Session)["main-pane-height"] == 40 |
308 | | - |
309 | | - if has_gte_version("3.0"): |
310 | | - assert window._show_option("main-pane-height") == 40 |
311 | | - else: |
312 | | - assert window._show_option("main-pane-height", scope=OptionScope.Window) == 40 |
313 | | - |
314 | | - if has_gte_version("2.3"): |
315 | | - window.set_option("pane-border-format", " #P ") |
316 | | - |
317 | | - if has_gte_version("3.0"): |
318 | | - assert window._show_option("pane-border-format") == " #P " |
319 | | - else: |
320 | | - assert ( |
321 | | - window._show_option("pane-border-format", scope=OptionScope.Window) |
322 | | - == " #P " |
323 | | - ) |
324 | | - |
325 | | - |
326 | 287 | def test_empty_window_option_returns_None(session: Session) -> None: |
327 | 288 | """Verify unset window option returns None.""" |
328 | 289 | window = session.new_window(window_name="test_window") |
|
0 commit comments