Flaky test: test_capture_pane_flags[join_wrapped_numbers] matches marker in command echo
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- python
- 領域
- testing-qa
調査の方向性
test_capture_pane_flags[join_wrapped_numbers] と、issue に示されている command_complete() のチェックから始めます。断続的な失敗を再現し、marker が shell コマンドのエコーではなくコマンド出力からのみ検出されることを確認し、名前が示されているテストを実行して確実にパスすることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Bug
test_capture_pane_flags[join_wrapped_numbers] fails intermittently because the completion marker is detected in the shell command echo line before the command actually executes.
Root cause
The command_complete() check uses:
def command_complete() -> bool:
output = "\n".join(pane.capture_pane())
return marker in output
This matches the marker string inside the prompt echo ($ printf ... echo "__DONE_join_wrapped_numbers__") — a false positive. The shell echoes the full command before executing it, so the marker appears in the pane buffer before seq produces any output.
Expected behavior
The marker should only be detected when it appears as command output (its own line), not as part of the typed command echo.
Fix
Change the check to skip lines that start with the shell prompt ($):
def command_complete() -> bool:
lines = pane.capture_pane()
return any(marker in line and not line.lstrip().startswith("$") for line in lines)
Reproduction
The failure is timing-dependent. On fast systems seq completes before the next capture, masking the bug. On slower systems or CI, the race is more visible.
- 主要言語
- Python
- スター
- 1.2k
- フォーク
- 127
- 平均マージ
- 2時間 13分
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
tmux-python/libtmux のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
tmux-python/libtmux#759 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
tmux-python/libtmux#745 · コメント 2 件 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
tmux-python/libtmux#744 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
tmux-python/libtmux#731 ·
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
tmux-python/libtmux#740 · コメント 1 件 ·
tmux-python/libtmux の issue をすべて見る
似ている issue
-
documentation help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
simonw/sqlite-utils#872 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100