Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:58:21

0001 #!/usr/bin/env python
0002 #
0003 # Licensed under the Apache License, Version 2.0 (the "License");
0004 # You may not use this file except in compliance with the License.
0005 # You may obtain a copy of the License at
0006 # http://www.apache.org/licenses/LICENSE-2.0OA
0007 #
0008 # Authors:
0009 # - Wen Guan, <wen.guan@cern.ch>, 2024
0010 
0011 
0012 """
0013 Test workflow.
0014 """
0015 
0016 # import datetime
0017 # import inspect
0018 # import sys
0019 
0020 from idds.common.imports import import_func, get_func_name
0021 
0022 
0023 func_name = "test_iworkflow1.py:__main__:test_workflow1"
0024 func = import_func(func_name)
0025 print(func)
0026 func()
0027 
0028 # sys.exit(1)
0029 
0030 for func_name in ["test_iworkflow1.py:__main__:test_workflow2", "test_iworkflow1.py:__main__:test_workflow1"]:
0031     func = import_func(func_name)
0032     print(func)
0033     func()
0034 
0035     func_name = get_func_name(func)
0036     print(func_name)
0037 
0038     func = import_func(func_name)
0039     print(func)
0040     func()