Intermittent / flaky test test_capture_pane
johanneskastl opened this issue · 0 comments
johanneskastl commented
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