Skip to content

Commit 2958176

Browse files
committed
refactor(tests): remove dead code and unused xfail
why: Clean up test code by removing unused/impossible code paths. what: - Remove unused xfail_reason from pane_title_changed (test uses pytest.skip() before xfail can trigger) - Remove dead assertion block in test_options.py that contradicted the preceding assert (lines 445-456)
1 parent 7878c1c commit 2958176

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

tests/test_hooks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,6 @@ class HookTestCase(t.NamedTuple):
415415
"pane_title_changed",
416416
"pane-title-changed",
417417
"3.5",
418-
xfail_reason="pane-title-changed requires tmux 3.5+",
419418
),
420419
# NOTE: client-light-theme and client-dark-theme are not in any released tmux
421420
# version yet (will be in 3.6+). Add them back when 3.6 is released.

tests/test_options.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -442,19 +442,6 @@ def test_show_option_pane_fixture(
442442

443443
assert result == expected
444444

445-
if expected is None:
446-
assert result is not None, (
447-
f"Expected {expected} to be {type(expected)}, got None"
448-
)
449-
450-
if isinstance(expected, dict):
451-
assert isinstance(result, dict), f'Expected dict, got "{type(result)}"'
452-
453-
for k, v in expected.items():
454-
assert k in result
455-
456-
assert result[k] == v
457-
458445

459446
def test_stable_baseline_options_and_hooks(server: Server) -> None:
460447
"""Ensure stable baseline across tmux versions."""

0 commit comments

Comments
 (0)