Skip to content

Commit c77af29

Browse files
committed
!squash test_options: renamings
1 parent 68c2a6a commit c77af29

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/test_options.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ class OptionDataclassTestFixture(t.NamedTuple):
336336
test_id: str
337337

338338
# test data
339-
option_data: list[str] # option data (raw)
339+
mocked_cmd_stdout: list[str] # option data (raw)
340340
tmux_option: str # e.g. terminal-features
341341

342342
# results
@@ -347,7 +347,7 @@ class OptionDataclassTestFixture(t.NamedTuple):
347347
TEST_FIXTURES: list[OptionDataclassTestFixture] = [
348348
OptionDataclassTestFixture(
349349
test_id="terminal-features",
350-
option_data=textwrap.dedent(
350+
mocked_cmd_stdout=textwrap.dedent(
351351
"""
352352
terminal-features[0] xterm*:clipboard:ccolour:cstyle:focus
353353
terminal-features[1] screen*:title
@@ -364,7 +364,7 @@ class OptionDataclassTestFixture(t.NamedTuple):
364364
),
365365
OptionDataclassTestFixture(
366366
test_id="command-alias",
367-
option_data=textwrap.dedent(
367+
mocked_cmd_stdout=textwrap.dedent(
368368
"""
369369
command-alias[0] split-pane=split-window
370370
command-alias[1] splitp=split-window
@@ -397,17 +397,17 @@ class OptionDataclassTestFixture(t.NamedTuple):
397397
TEST_FIXTURES,
398398
ids=[test.test_id for test in TEST_FIXTURES],
399399
)
400-
def test_option_dataclass_fixture(
400+
def test_mocked_cmd_stdoutclass_fixture(
401401
monkeypatch: pytest.MonkeyPatch,
402402
test_id: str,
403-
option_data: list[str],
403+
mocked_cmd_stdout: list[str],
404404
tmux_option: str,
405405
expected: t.Any,
406406
dataclass_attribute: str,
407407
server: Server,
408408
) -> None:
409409
"""Parametrized test grid for options."""
410-
monkeypatch.setattr(server, "cmd", fake_cmd(stdout=option_data))
410+
monkeypatch.setattr(server, "cmd", fake_cmd(stdout=mocked_cmd_stdout))
411411

412412
options_ = server._show_options()
413413
assert any(tmux_option in k for k in options_)
@@ -425,7 +425,7 @@ def test_option_dataclass_fixture(
425425
def test_show_option_pane_fixture(
426426
monkeypatch: pytest.MonkeyPatch,
427427
test_id: str,
428-
option_data: list[str],
428+
mocked_cmd_stdout: list[str],
429429
tmux_option: str,
430430
expected: t.Any,
431431
dataclass_attribute: str,
@@ -436,7 +436,7 @@ def test_show_option_pane_fixture(
436436
window = session.new_window(window_name="test")
437437
pane = window.split_window(attach=False)
438438

439-
monkeypatch.setattr(pane, "cmd", fake_cmd(stdout=option_data))
439+
monkeypatch.setattr(pane, "cmd", fake_cmd(stdout=mocked_cmd_stdout))
440440

441441
result = pane.show_option(tmux_option)
442442

0 commit comments

Comments
 (0)