Skip to content

Commit c5b09dd

Browse files
committed
!squash test show option more
1 parent 066f0c1 commit c5b09dd

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

tests/test_options.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,19 @@ def test_show_option_pane_fixture(
409409

410410
monkeypatch.setattr(pane, "cmd", fake_cmd(stdout=option_data))
411411

412-
assert pane.show_option(tmux_option) == expected
413-
for k, v in expected.items():
414-
assert pane.show_option(tmux_option)[k] == v
412+
result = pane.show_option(tmux_option)
413+
414+
assert result == expected
415+
416+
if expected is None:
417+
assert (
418+
result is not None
419+
), f"Expected {expected} to be {type(expected)}, got None"
420+
421+
if isinstance(expected, dict):
422+
assert isinstance(result, dict), f'Expected dict, got "{type(result)}"'
423+
424+
for k, v in expected.items():
425+
assert k in result
426+
427+
assert result[k] == v

0 commit comments

Comments
 (0)