Beispiel #1
0
 def _run_test(_executor_name):
     executor = create_executor(_executor_name, import_dir_paths,
                                user_config)
     with context_dir(user_config.default_execution_dir,
                      change_dir=True):
         executor.run_workflow(wdl_path,
                               inputs=inputs,
                               expected=expected,
                               **kwargs)
Beispiel #2
0
    def _run_test(self,
                  executor_name: str,
                  wdl_path: Path,
                  inputs: Optional[dict] = None,
                  expected: Optional[dict] = None,
                  callback: Optional[Callable[[str, Path, dict], None]] = None,
                  **kwargs) -> dict:
        executor = create_executor(executor_name, self._import_dirs,
                                   self._user_config)

        with context_dir(self._user_config.default_execution_dir,
                         change_dir=True) as execution_dir:
            outputs = executor.run_workflow(wdl_path,
                                            inputs=inputs,
                                            expected=expected,
                                            **kwargs)

            if callback:
                callback(executor_name, execution_dir, outputs)

            return outputs
Beispiel #3
0
def test_create_executor():
    with pytest.raises(RuntimeError):
        create_executor("foo", [], None)