(path, method, *args)
| 22 | import importlib.util |
| 23 | |
| 24 | def run_function(path, method, *args): |
| 25 | sys.path.append(os.path.dirname(path)) |
| 26 | spec = importlib.util.spec_from_file_location(os.path.basename(path).rstrip(".py"), path) |
| 27 | mod = importlib.util.module_from_spec(spec) |
| 28 | spec.loader.exec_module(mod) |
| 29 | fn = getattr(mod, method) |
| 30 | return fn(*args) |
| 31 | |
| 32 | def get_api_spec(spec_file, api_name): |
| 33 | with open(spec_file, "r") as fd: |
no outgoing calls
no test coverage detected