diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-09-11 22:20:15 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-09-11 22:20:15 +0200 |
| commit | 958c410ba8b621a8a4d8caf04012028e7f151e0f (patch) | |
| tree | e63465450b581afd2b631510e00b643efc5af9e7 /src/suite/decorator.py | |
| parent | 2ffd95c295b117053f6e5430ba3ccc72beb224aa (diff) | |
| download | minishell_test-958c410ba8b621a8a4d8caf04012028e7f151e0f.tar.gz minishell_test-958c410ba8b621a8a4d8caf04012028e7f151e0f.tar.bz2 minishell_test-958c410ba8b621a8a4d8caf04012028e7f151e0f.zip | |
Added comments
Diffstat (limited to 'src/suite/decorator.py')
| -rw-r--r-- | src/suite/decorator.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/suite/decorator.py b/src/suite/decorator.py index 448e0a3..d4801c3 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 20:08:27 by charles ### ########.fr # +# Updated: 2020/09/11 22:08:36 by charles ### ########.fr # # # # ############################################################################ # @@ -16,8 +16,10 @@ import inspect def suite(groups: [str] = [], bonus: bool = False): + """Decorator generator for suites arguments""" + def suite_wrapper(origin): - """ decorator for a suite function (fmt: suite_[name]) """ + """Decorator for a suite function (fmt: suite_[name]) """ mod_name = inspect.getmodule(origin).__name__[len("suites."):] # print(mod_name) @@ -30,7 +32,7 @@ def suite(groups: [str] = [], bonus: bool = False): s.add(Test(*args, **kwargs)) origin(test) - s.add_generator(test_generator) + s.generator_func = test_generator Suite.available.append(s) return test_generator |
