test/py: Move the timeout to console_base

This timeout relates to the expect() function so move it into the same
file and class.

Reset the timeout when a new spawn is created, to mimic the existing
behabiour. Update a few tests which access the timeout directly.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-07-23 17:42:03 -06:00
parent c5cad939ad
commit 31c6d1d063
4 changed files with 23 additions and 20 deletions

View File

@@ -68,7 +68,6 @@ class Spawn:
self.logfile_read = None
self.before = ''
self.after = ''
self.timeout = None
# http://stackoverflow.com/questions/7857352/python-regex-to-match-vt100-escape-sequences
self.re_vt100 = re.compile(r'(\x1b\[|\x9b)[^@-_]*[@-_]|\x1b[@-_]', re.I)