faster fail

This commit is contained in:
Kovid Goyal 2022-02-24 10:11:42 +05:30
parent a71e7d7eb1
commit 55ede897b9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -78,7 +78,13 @@ print(' '.join(map(str, buf)))'''), lines=13, cols=77)
self.assertFalse(os.path.exists(os.path.join(home_dir, '.terminfo/kitty.terminfo')))
pty = self.create_pty(f'{sh} -c {shlex.quote(script)}', cwd=home_dir, env=env)
del script
pty.wait_till(lambda: 'UNTAR_DONE' in pty.screen_contents())
def check_untar_or_fail():
q = pty.screen_contents()
if 'bzip2' in q:
raise ValueError('Untarring failed with screen contents:\n' + q)
return 'UNTAR_DONE' in q
pty.wait_till(check_untar_or_fail)
self.assertTrue(os.path.exists(os.path.join(home_dir, '.terminfo/kitty.terminfo')))
if SHELL_INTEGRATION_VALUE != 'enabled':
pty.wait_till(lambda: len(pty.screen_contents().splitlines()) > 1)