Skip to content

Commit 9d8ec2e

Browse files
committed
test_logging(fix[schema]): filter for post-execution record with tmux_exit_code
why: After rebase, tmux_cmd now emits two DEBUG records per command (pre-execution and post-execution). The schema test grabbed the first record which lacks tmux_exit_code. what: - Filter on hasattr(r, "tmux_exit_code") instead of hasattr(r, "tmux_cmd")
1 parent ce76b3a commit 9d8ec2e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/test_logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def test_tmux_cmd_debug_logging_schema(
2020
"""Test that tmux_cmd produces structured log records per AGENTS.md."""
2121
with caplog.at_level(logging.DEBUG, logger="libtmux.common"):
2222
server.cmd("list-sessions")
23-
records = [r for r in caplog.records if hasattr(r, "tmux_cmd")]
23+
records = [r for r in caplog.records if hasattr(r, "tmux_exit_code")]
2424
assert len(records) >= 1
2525
record = t.cast(t.Any, records[0])
2626
assert isinstance(record.tmux_cmd, str)

0 commit comments

Comments
 (0)