diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2021-02-27 16:16:14 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2021-02-27 16:16:14 +0100 |
| commit | 632f88fd315626bf3196024f2a67c5288ea56333 (patch) | |
| tree | a041d430ac73cb6d14d61370b168b7ea1c28a2a6 /minishell_test/suite | |
| parent | 86355a6fd7375f954bf92cb49a14c718610c4d60 (diff) | |
| parent | 820d1ee00975d2e7859e4b2aded88dbf56a3b347 (diff) | |
| download | minishell_test-632f88fd315626bf3196024f2a67c5288ea56333.tar.gz minishell_test-632f88fd315626bf3196024f2a67c5288ea56333.tar.bz2 minishell_test-632f88fd315626bf3196024f2a67c5288ea56333.zip | |
Merge branch 'config'
Diffstat (limited to 'minishell_test/suite')
| -rw-r--r-- | minishell_test/suite/suite.py | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/minishell_test/suite/suite.py b/minishell_test/suite/suite.py index 8c57633..5d36600 100644 --- a/minishell_test/suite/suite.py +++ b/minishell_test/suite/suite.py @@ -6,13 +6,13 @@ # By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/07/15 18:24:29 by charles #+# #+# # -# Updated: 2021/02/05 18:15:26 by charles ### ########.fr # +# Updated: 2021/02/27 12:07:59 by cacharle ### ########.fr # # # # ############################################################################ # from typing import List, Tuple, Optional, Callable -import minishell_test.config as config +from minishell_test import config from minishell_test.test import Test @@ -139,24 +139,19 @@ class Suite: def run(self) -> bool: """Run all test in the suite""" - if config.VERBOSE_LEVEL == 0: - print(self.name + ": ", end="") - else: - print("{}{:#^{width}}{}".format( - self.BLUE_CHARS, - " " + self.name + " ", - self.CLOSE_CHARS, - width=config.TERM_COLS - )) - for i, t in enumerate(self.tests): - if config.RANGE is not None: - if not (config.RANGE[0] <= i <= config.RANGE[1]): - continue - t.run(i) - if config.EXIT_FIRST and t.result is not None and t.result.failed: - return False - if config.VERBOSE_LEVEL == 0: - print() + print("{}{:#^{width}}{}".format( + self.BLUE_CHARS, + " " + self.name + " ", + self.CLOSE_CHARS, + width=config.TERM_COLS + )) + for i, t in enumerate(self.tests): + if config.RANGE is not None: + if not (config.RANGE[0] <= i <= config.RANGE[1]): + continue + t.run(i) + if config.EXIT_FIRST and t.result is not None and t.result.failed: + return False return True def total(self) -> Tuple[int, int]: |
