|
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 |
@@ -268,44 +267,6 @@ def test_set_window_and_show_window_options(session: Session) -> None: |
268 | 267 | assert window.show_window_option("pane-border-format") == " #P " |
269 | 268 |
|
270 | 269 |
|
271 | | -def test_set_and_show_options(session: Session) -> None: |
272 | | - """Window.set_option() then Window._show_options(key).""" |
273 | | - window = session.new_window(window_name="test_window") |
274 | | - |
275 | | - window.set_option("main-pane-height", 20) |
276 | | - if has_gte_version("3.0"): |
277 | | - assert window._show_option("main-pane-height") == 20 |
278 | | - else: |
279 | | - assert window._show_option("main-pane-height", scope=OptionScope.Window) == 20 |
280 | | - |
281 | | - window.set_option("main-pane-height", 40) |
282 | | - |
283 | | - if has_gte_version("3.0"): |
284 | | - assert window._show_option("main-pane-height") == 40 |
285 | | - else: |
286 | | - assert window._show_option("main-pane-height", scope=OptionScope.Window) == 40 |
287 | | - |
288 | | - # By default, show-options will session scope, even if target is a window |
289 | | - with pytest.raises(KeyError): |
290 | | - assert window._show_options(scope=OptionScope.Session)["main-pane-height"] == 40 |
291 | | - |
292 | | - if has_gte_version("3.0"): |
293 | | - assert window._show_option("main-pane-height") == 40 |
294 | | - else: |
295 | | - assert window._show_option("main-pane-height", scope=OptionScope.Window) == 40 |
296 | | - |
297 | | - if has_gte_version("2.3"): |
298 | | - window.set_option("pane-border-format", " #P ") |
299 | | - |
300 | | - if has_gte_version("3.0"): |
301 | | - assert window._show_option("pane-border-format") == " #P " |
302 | | - else: |
303 | | - assert ( |
304 | | - window._show_option("pane-border-format", scope=OptionScope.Window) |
305 | | - == " #P " |
306 | | - ) |
307 | | - |
308 | | - |
309 | 270 | def test_empty_window_option_returns_None(session: Session) -> None: |
310 | 271 | """Verify unset window option returns None.""" |
311 | 272 | window = session.new_window(window_name="test_window") |
|
0 commit comments