From 2ffd95c295b117053f6e5430ba3ccc72beb224aa Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Fri, 11 Sep 2020 20:18:37 +0200 Subject: Linting with flake8 --- src/suite/decorator.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/suite/decorator.py') 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 +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # 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 -- cgit