aboutsummaryrefslogtreecommitdiff
path: root/src/suite/decorator.py
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-09-11 20:18:37 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-09-11 20:18:37 +0200
commit2ffd95c295b117053f6e5430ba3ccc72beb224aa (patch)
treefd61d882314bb09f0250ee55caeedd1101938bca /src/suite/decorator.py
parent43be3d890eb37bef2f336bbc64e362a06bebe8ac (diff)
downloadminishell_test-2ffd95c295b117053f6e5430ba3ccc72beb224aa.tar.gz
minishell_test-2ffd95c295b117053f6e5430ba3ccc72beb224aa.tar.bz2
minishell_test-2ffd95c295b117053f6e5430ba3ccc72beb224aa.zip
Linting with flake8
Diffstat (limited to 'src/suite/decorator.py')
-rw-r--r--src/suite/decorator.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/suite/decorator.py b/src/suite/decorator.py
index e825839..448e0a3 100644
--- a/src/suite/decorator.py
+++ b/src/suite/decorator.py
@@ -6,7 +6,7 @@
# By: charles <me@cacharle.xyz> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/09/11 12:28:00 by charles #+# #+# #
-# Updated: 2020/09/11 16:43:00 by charles ### ########.fr #
+# Updated: 2020/09/11 20:08:27 by charles ### ########.fr #
# #
# ############################################################################ #
@@ -14,6 +14,7 @@ from suite import Suite
from test import Test
import inspect
+
def suite(groups: [str] = [], bonus: bool = False):
def suite_wrapper(origin):
""" decorator for a suite function (fmt: suite_[name]) """
@@ -23,10 +24,12 @@ def suite(groups: [str] = [], bonus: bool = False):
name = "{}/{}".format(mod_name, origin.__name__[len("suite_"):])
s = Suite(name, groups + [mod_name], bonus)
+
def test_generator():
def test(*args, **kwargs):
s.add(Test(*args, **kwargs))
origin(test)
+
s.add_generator(test_generator)
Suite.available.append(s)
return test_generator