File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -142,13 +142,24 @@ def call(query):
142142@click .argument ("query" )
143143def test (workflow_path : str , query : str ):
144144 try :
145- module = importlib .import_module (workflow_path )
145+ module = importlib .import_module (workflow_path , "main" )
146146 except ImportError as e :
147147 print (e )
148- pass
148+ exit ( 1 )
149149
150- print (module .call_workflow (wf = Workflow3 ()))
151- click .echo ("test...todo" )
150+ from logging import Logger
151+ import dataclasses
152+ import json
153+
154+ logger = Logger (__file__ )
155+
156+ wf = Workflow3 ()
157+ print (wf .args )
158+ print (wf .args [2 :])
159+
160+ responses = module .main (args = wf .args [2 :], logger = logger )
161+ for response in responses :
162+ print (json .dumps (dataclasses .asdict (response ), indent = 4 ))
152163
153164
154165if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments