From 067cd0ef6a7e031ea839c7d118da002267df95b3 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 19 Jul 2018 23:00:13 +0200 Subject: wip. --- test/doit/test_doit.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'test') 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): -- cgit v1.2.3