Skip to content

Commit

Permalink
tests: show_window_option() -> show_option()
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Feb 7, 2024
1 parent e16c2b4 commit 6cd43f0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions tests/legacy_api/test_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,20 +227,20 @@ def test_set_window_and_show_window_options(session: Session) -> None:
assert window.show_window_option("pane-border-format") == " #P "


def test_set_and_show_window_options(session: Session) -> None:
"""Window.set_option() then Window.show_window_options(key)."""
def test_set_and_show_options(session: Session) -> None:
"""Window.set_option() then Window.show_options(key)."""
window = session.new_window(window_name="test_window")

window.set_option("main-pane-height", 20)
assert window.show_window_option("main-pane-height") == 20
assert window.show_option("main-pane-height") == 20

window.set_option("main-pane-height", 40)
assert window.show_window_option("main-pane-height") == 40
assert window.show_window_options()["main-pane-height"] == 40
assert window.show_option("main-pane-height") == 40
assert window.show_options()["main-pane-height"] == 40

if has_gte_version("2.3"):
window.set_option("pane-border-format", " #P ")
assert window.show_window_option("pane-border-format") == " #P "
assert window.show_option("pane-border-format") == " #P "


def test_empty_window_option_returns_None(session: Session) -> None:
Expand Down
10 changes: 5 additions & 5 deletions tests/test_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,19 +262,19 @@ def test_set_window_and_show_window_options(session: Session) -> None:


def test_set_and_show_window_options(session: Session) -> None:
"""Window.set_option() then Window.show_window_options(key)."""
"""Window.set_option() then Window.show_options(key)."""
window = session.new_window(window_name="test_window")

window.set_option("main-pane-height", 20)
assert window.show_window_option("main-pane-height") == 20
assert window.show_option("main-pane-height") == 20

window.set_option("main-pane-height", 40)
assert window.show_window_option("main-pane-height") == 40
assert window.show_window_options()["main-pane-height"] == 40
assert window.show_option("main-pane-height") == 40
assert window.show_options()["main-pane-height"] == 40

if has_gte_version("2.3"):
window.set_option("pane-border-format", " #P ")
assert window.show_window_option("pane-border-format") == " #P "
assert window.show_option("pane-border-format") == " #P "


def test_empty_window_option_returns_None(session: Session) -> None:
Expand Down

0 comments on commit 6cd43f0

Please sign in to comment.