Skip to content

Commit d6dfb8f

Browse files
committed
!squash test_options: renamings
1 parent 4f1180d commit d6dfb8f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/test_options.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ class OptionDataclassTestFixture(t.NamedTuple):
334334
test_id: str
335335

336336
# test data
337-
option_data: t.List[str] # option data (raw)
337+
mocked_cmd_stdout: t.List[str] # option data (raw)
338338
tmux_option: str # e.g. terminal-features
339339

340340
# results
@@ -345,7 +345,7 @@ class OptionDataclassTestFixture(t.NamedTuple):
345345
TEST_FIXTURES: t.List[OptionDataclassTestFixture] = [
346346
OptionDataclassTestFixture(
347347
test_id="terminal-features",
348-
option_data=textwrap.dedent(
348+
mocked_cmd_stdout=textwrap.dedent(
349349
"""
350350
terminal-features[0] xterm*:clipboard:ccolour:cstyle:focus
351351
terminal-features[1] screen*:title
@@ -362,7 +362,7 @@ class OptionDataclassTestFixture(t.NamedTuple):
362362
),
363363
OptionDataclassTestFixture(
364364
test_id="command-alias",
365-
option_data=textwrap.dedent(
365+
mocked_cmd_stdout=textwrap.dedent(
366366
"""
367367
command-alias[0] split-pane=split-window
368368
command-alias[1] splitp=split-window
@@ -395,17 +395,17 @@ class OptionDataclassTestFixture(t.NamedTuple):
395395
TEST_FIXTURES,
396396
ids=[test.test_id for test in TEST_FIXTURES],
397397
)
398-
def test_option_dataclass_fixture(
398+
def test_mocked_cmd_stdoutclass_fixture(
399399
monkeypatch: pytest.MonkeyPatch,
400400
test_id: str,
401-
option_data: t.List[str],
401+
mocked_cmd_stdout: t.List[str],
402402
tmux_option: str,
403403
expected: t.Any,
404404
dataclass_attribute: str,
405405
server: "Server",
406406
) -> None:
407407
"""Parametrized test grid for options."""
408-
monkeypatch.setattr(server, "cmd", fake_cmd(stdout=option_data))
408+
monkeypatch.setattr(server, "cmd", fake_cmd(stdout=mocked_cmd_stdout))
409409

410410
_options = server._show_options()
411411
assert any(tmux_option in k for k in _options)
@@ -423,7 +423,7 @@ def test_option_dataclass_fixture(
423423
def test_show_option_pane_fixture(
424424
monkeypatch: pytest.MonkeyPatch,
425425
test_id: str,
426-
option_data: t.List[str],
426+
mocked_cmd_stdout: t.List[str],
427427
tmux_option: str,
428428
expected: t.Any,
429429
dataclass_attribute: str,
@@ -434,7 +434,7 @@ def test_show_option_pane_fixture(
434434
window = session.new_window(window_name="test")
435435
pane = window.split_window(attach=False)
436436

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

439439
result = pane.show_option(tmux_option)
440440

0 commit comments

Comments
 (0)