diff options
Diffstat (limited to 'src/suite/decorator.py')
| -rw-r--r-- | src/suite/decorator.py | 5 |
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 |
