From 7081b93b8ed4f98c628400e05d22d0523f41a842 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sat, 27 Feb 2021 12:24:37 +0100 Subject: Fixing #16 - Adding support for custom config file in user directory --- minishell_test/suite/suite.py | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) (limited to 'minishell_test/suite') 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 +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # 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]: -- cgit