diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-09-11 14:27:26 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-09-11 14:27:26 +0200 |
| commit | d0a80859f630866461e8a888b3f8fe008c8158ba (patch) | |
| tree | ad0ebcc42a620aeea5a4407e1cacbac24faf1dcb /src/suite/suite.py | |
| parent | 46ba2708f83bf46186c33bf84975d39e87f467c1 (diff) | |
| download | minishell_test-d0a80859f630866461e8a888b3f8fe008c8158ba.tar.gz minishell_test-d0a80859f630866461e8a888b3f8fe008c8158ba.tar.bz2 minishell_test-d0a80859f630866461e8a888b3f8fe008c8158ba.zip | |
Added suite group and suite bonus, Added signal (not tested)
Diffstat (limited to 'src/suite/suite.py')
| -rw-r--r-- | src/suite/suite.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/suite/suite.py b/src/suite/suite.py index fee4aa9..d796cf7 100644 --- a/src/suite/suite.py +++ b/src/suite/suite.py @@ -6,12 +6,11 @@ # By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2020/07/15 18:24:29 by charles #+# #+# # -# Updated: 2020/09/11 12:27:47 by charles ### ########.fr # +# Updated: 2020/09/11 14:18:01 by charles ### ########.fr # # # # ############################################################################ # import config -from test import Test class Suite: @@ -26,7 +25,12 @@ class Suite: def setup(cls, asked_names: [str]): if len(asked_names) == 0: asked_names = [s.name for s in cls.available] - cls.available = [s for s in cls.available if s.name in asked_names] + if not config.BONUS: + cls.available = [s for s in cls.available if not s.bonus] + cls.available = list(set( + [s for s in cls.available if s.name in asked_names] + + [s for s in cls.available if any([g for g in s.groups if g in asked_names])] + )) for s in cls.available: s.generate() @@ -34,8 +38,10 @@ class Suite: def available_names(cls) -> [str]: return [s.name for s in cls.available] - def __init__(self, name: str): + def __init__(self, name: str, groups: [str], bonus: bool = False): self.name = name + self.groups = groups + self.bonus = bonus self.generator_func = None self.tests = [] |
