Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Intermittent / flaky test test_capture_pane

Aperta
#484 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python
Ambito
cli, testing

Direzione di ricerca

Start with tests/test_pane.py and run test_capture_pane on the affected architectures if available. Investigate why the captured pane contents sometimes omit the command output or prompt, and use the failure details to define a reliable test result.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

There is another test that sometimes / intermittently / not reproducibly fails: test_capture_pane

This is for x86_64, i586, armv7l and ppc64.

I know the exact error message would be helpful, but I was too quick in fixing and now I cannot reproduce. I'll supply the error message as soon as the package fails again.

[   64s] =================================== FAILURES ===================================
[   64s] ______________________________ test_capture_pane _______________________________
[   64s] 
[   64s] session = Session($1 libtmux_zv_reb2k)
[   64s] 
[   64s]     def test_capture_pane(session: Session) -> None:
[   64s]         env = shutil.which("env")
[   64s]         assert env is not None, "Cannot find usable `env` in PATH."
[   64s]     
[   64s]         session.new_window(
[   64s]             attach=True,
[   64s]             window_name="capture_pane",
[   64s]             window_shell=f"{env} PS1='$ ' sh",
[   64s]         )
[   64s]         pane = session.attached_window.attached_pane
[   64s]         assert pane is not None
[   64s]         pane_contents = "\n".join(pane.capture_pane())
[   64s]         assert pane_contents == "$"
[   64s]         pane.send_keys(
[   64s]             r'printf "\n%s\n" "Hello World !"', literal=True, suppress_history=False
[   64s]         )
[   64s]         pane_contents = "\n".join(pane.capture_pane())
[   64s] >       assert pane_contents == r'$ printf "\n%s\n" "Hello World !"{}'.format(
[   64s]             "\n\nHello World !\n$"
[   64s]         )
[   64s] E       assert '$ printf "\\...ello World !"' == '$ printf "\\...lo World !\n$'
[   64s] E         - $ printf "\n%s\n" "Hello World !"
[   64s] E         ?                                  -
[   64s] E         + $ printf "\n%s\n" "Hello World !"
[   64s] E         - 
[   64s] E         - Hello World !
[   64s] E         - $
[   64s] 
[   64s] tests/test_pane.py:90: AssertionError
Lingua principale
Python
Stelle
1.2k
Fork
127
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tmux-python/libtmux

Tutte le issue di tmux-python/libtmux

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.