@@ -336,7 +336,7 @@ class OptionDataclassTestFixture(t.NamedTuple):
336
336
test_id : str
337
337
338
338
# test data
339
- option_data : list [str ] # option data (raw)
339
+ mocked_cmd_stdout : list [str ] # option data (raw)
340
340
tmux_option : str # e.g. terminal-features
341
341
342
342
# results
@@ -347,7 +347,7 @@ class OptionDataclassTestFixture(t.NamedTuple):
347
347
TEST_FIXTURES : list [OptionDataclassTestFixture ] = [
348
348
OptionDataclassTestFixture (
349
349
test_id = "terminal-features" ,
350
- option_data = textwrap .dedent (
350
+ mocked_cmd_stdout = textwrap .dedent (
351
351
"""
352
352
terminal-features[0] xterm*:clipboard:ccolour:cstyle:focus
353
353
terminal-features[1] screen*:title
@@ -364,7 +364,7 @@ class OptionDataclassTestFixture(t.NamedTuple):
364
364
),
365
365
OptionDataclassTestFixture (
366
366
test_id = "command-alias" ,
367
- option_data = textwrap .dedent (
367
+ mocked_cmd_stdout = textwrap .dedent (
368
368
"""
369
369
command-alias[0] split-pane=split-window
370
370
command-alias[1] splitp=split-window
@@ -397,17 +397,17 @@ class OptionDataclassTestFixture(t.NamedTuple):
397
397
TEST_FIXTURES ,
398
398
ids = [test .test_id for test in TEST_FIXTURES ],
399
399
)
400
- def test_option_dataclass_fixture (
400
+ def test_mocked_cmd_stdoutclass_fixture (
401
401
monkeypatch : pytest .MonkeyPatch ,
402
402
test_id : str ,
403
- option_data : list [str ],
403
+ mocked_cmd_stdout : list [str ],
404
404
tmux_option : str ,
405
405
expected : t .Any ,
406
406
dataclass_attribute : str ,
407
407
server : Server ,
408
408
) -> None :
409
409
"""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 ))
411
411
412
412
options_ = server ._show_options ()
413
413
assert any (tmux_option in k for k in options_ )
@@ -425,7 +425,7 @@ def test_option_dataclass_fixture(
425
425
def test_show_option_pane_fixture (
426
426
monkeypatch : pytest .MonkeyPatch ,
427
427
test_id : str ,
428
- option_data : list [str ],
428
+ mocked_cmd_stdout : list [str ],
429
429
tmux_option : str ,
430
430
expected : t .Any ,
431
431
dataclass_attribute : str ,
@@ -436,7 +436,7 @@ def test_show_option_pane_fixture(
436
436
window = session .new_window (window_name = "test" )
437
437
pane = window .split_window (attach = False )
438
438
439
- monkeypatch .setattr (pane , "cmd" , fake_cmd (stdout = option_data ))
439
+ monkeypatch .setattr (pane , "cmd" , fake_cmd (stdout = mocked_cmd_stdout ))
440
440
441
441
result = pane .show_option (tmux_option )
442
442
0 commit comments