From 4d93801d5f97f6530749cad493af7a54bb1e809e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 26 Mar 2024 08:03:20 +0530 Subject: [PATCH] Retry flaky test --- kitty_tests/ssh.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kitty_tests/ssh.py b/kitty_tests/ssh.py index a36b3fb5a..94f364686 100644 --- a/kitty_tests/ssh.py +++ b/kitty_tests/ssh.py @@ -8,6 +8,7 @@ import os import shutil import subprocess import tempfile +import time from contextlib import suppress from functools import lru_cache @@ -188,6 +189,13 @@ env COLORTERM self.assertIn(expected_login_shell, pty.screen_contents()) def test_ssh_shell_integration(self): + try: + return self.do_ssh_shell_integration() + except Exception: + time.sleep(1) + self.do_ssh_shell_integration() + + def do_ssh_shell_integration(self): ok_login_shell = '' for sh in self.all_possible_sh: for login_shell in {'fish', 'zsh', 'bash'} & set(self.all_possible_sh):