From 297592242c290a81ca4ba08802841f4c33a4de25 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 3 Mar 2022 17:22:42 +0530 Subject: [PATCH] Fix #4782 Presumably the failure is caused by zsh not having finished drawing the prompt when the cursor shape is changed. So instead wait till the expected prompt is drawn. There are probably more places where this change needs to be made, which I cant tell since I cant reproduce. --- kitty_tests/shell_integration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty_tests/shell_integration.py b/kitty_tests/shell_integration.py index b7777d779..b0ccc0341 100644 --- a/kitty_tests/shell_integration.py +++ b/kitty_tests/shell_integration.py @@ -107,7 +107,7 @@ RPS1="{rps1}" pty.wait_till(lambda: pty.screen.cursor.shape == CURSOR_BEAM) except TimeoutError as e: raise AssertionError(f'Cursor was not changed to beam. Screen contents: {repr(pty.screen_contents())}') from e - self.ae(pty.screen_contents(), q) + pty.wait_till(lambda: pty.screen_contents() == q) self.ae(pty.callbacks.titlebuf[-1], '~') pty.callbacks.clear() pty.send_cmd_to_child('mkdir test && ls -a')