aboutsummaryrefslogtreecommitdiff
path: root/minishell_test/suite
diff options
context:
space:
mode:
Diffstat (limited to 'minishell_test/suite')
-rw-r--r--minishell_test/suite/decorator.py4
-rw-r--r--minishell_test/suite/suite.py12
2 files changed, 8 insertions, 8 deletions
diff --git a/minishell_test/suite/decorator.py b/minishell_test/suite/decorator.py
index a843bc4..45f96b6 100644
--- a/minishell_test/suite/decorator.py
+++ b/minishell_test/suite/decorator.py
@@ -6,7 +6,7 @@
# By: charles <me@cacharle.xyz> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/09/11 12:28:00 by charles #+# #+# #
-# Updated: 2021/02/05 14:50:41 by charles ### ########.fr #
+# Updated: 2021/02/05 17:44:25 by charles ### ########.fr #
# #
# ############################################################################ #
@@ -26,7 +26,7 @@ def suite(groups: List[str] = [], bonus: bool = False): # type: ignore
mod = inspect.getmodule(origin)
if mod is None:
raise NotImplementedError
- mod_name = mod.__name__[len("suites."):]
+ mod_name = mod.__name__[len("minishell_test.suites."):]
name = "{}/{}".format(mod_name, origin.__name__[len("suite_"):])
description = origin.__doc__
if description is None:
diff --git a/minishell_test/suite/suite.py b/minishell_test/suite/suite.py
index df342a0..8fd39bf 100644
--- a/minishell_test/suite/suite.py
+++ b/minishell_test/suite/suite.py
@@ -6,7 +6,7 @@
# By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/07/15 18:24:29 by charles #+# #+# #
-# Updated: 2021/02/05 14:24:36 by charles ### ########.fr #
+# Updated: 2021/02/05 18:01:33 by charles ### ########.fr #
# #
# ############################################################################ #
@@ -44,9 +44,9 @@ class Suite:
names.append(name)
continue
matches = [n for n in suite_names
- if n.find("/") != -1
- and n[n.find("/") + 1:].startswith(name)
- or n.startswith(name)]
+ if n.find("/") != -1 and
+ n[n.find("/") + 1:].startswith(name) or
+ n.startswith(name)]
if len(matches) == 1:
names.append(matches[0])
elif len(matches) != 0 and all(n.startswith(name) for n in matches):
@@ -63,8 +63,8 @@ class Suite:
sys.exit(1)
cls.available = list(set(
- [s for s in cls.available if s.name in names]
- + [s for s in cls.available if any(g for g in s.groups if g in names)]
+ [s for s in cls.available if s.name in names] +
+ [s for s in cls.available if any(g for g in s.groups if g in names)]
))
cls.available.sort(key=lambda s: s.name)
for s in cls.available: