From c13695b2198646d9c37cdf5fc1fff0ac7b192db7 Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Tue, 18 Oct 2022 10:16:28 -0700 Subject: [PATCH] Adds timer next to progress bar in run_tests.py. --- tests/run_tests.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/run_tests.py b/tests/run_tests.py index 5806c34..3b74ccb 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -121,7 +121,7 @@ class TestResults: out += '\n' if len(self.tests_timed_out) > 0: - out += f' ..{ansi.fg("yellow")}' + out += f' ..{ansi.fg("lightning yellow")}' out += f'{len(self.tests_timed_out)} tests timed out' out += f'{ansi.reset()}:\n' for test in self.tests_failed: @@ -588,13 +588,14 @@ def main() -> Optional[int]: done, started, text=text_utils.BarGraphText.FRACTION, - width=80, + width=72, fgcolor=color, ), - end='\r', + end='', flush=True, ) - time.sleep(0.5) + print(f' {color}{now - start_time:.1f}s{ansi.reset()}', end='\r') + time.sleep(0.1) print(f'{ansi.clear_line()}Final Report:') if config.config['coverage']: -- 2.45.2