From 7cbaf473ca385cd64978a2d6f25f2df6af76bdb9 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Tue, 2 Mar 2021 14:33:51 +0100 Subject: Refactoring test.result.Result --- minishell_test/suite/suite.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'minishell_test/suite') diff --git a/minishell_test/suite/suite.py b/minishell_test/suite/suite.py index b1aba4f..b058569 100644 --- a/minishell_test/suite/suite.py +++ b/minishell_test/suite/suite.py @@ -6,7 +6,7 @@ # By: charles +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/07/15 18:24:29 by charles #+# #+# # -# Updated: 2021/02/27 12:07:59 by cacharle ### ########.fr # +# Updated: 2021/03/02 11:12:35 by cacharle ### ########.fr # # # # ############################################################################ # @@ -145,12 +145,12 @@ class Suite: 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: + if Config.range is not None: + self.tests = self.test[Config.range[0] : Config.range[1] + 1] + for i, test in enumerate(self.tests): + result = test.run() + print(result.to_string(i)) + if Config.exit_first and result is not None and result.failed: return False return True -- cgit