diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/doit/test_doit.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/doit/test_doit.py b/test/doit/test_doit.py index a379c97..3a0c7ec 100644 --- a/test/doit/test_doit.py +++ b/test/doit/test_doit.py @@ -1,5 +1,10 @@ +import inspect +import logging import os import os.path +from inspect import Parameter + +logger = logging.getLogger(__name__) filedir = os.path.dirname(os.path.abspath(__file__)) schematics_dir = os.path.join(filedir, "schematics") @@ -19,7 +24,12 @@ def exec_task(task): ret = os.system(cmd) assert (ret == 0) else: - a() + parameters = {} + for p in inspect.signature(a).parameters.values(): + if p.kind == Parameter.POSITIONAL_OR_KEYWORD and p.name == "targets": + parameters["targets"] = targets + + a(**parameters) def test_doit(tmpdir, caplog): |