def test_module_from_func(self): # This test calls fasttext_evaluation from cmd line arguments. local_module = Module.from_func(self.workspace, fasttext_evaluation) module = local_module() module.set_inputs(**self.prepare_inputs()) status = module.run(use_docker=True) self.assertEqual(status, 'Completed', 'Module run failed.')
def test_module_from_func(self): # This test calls mpi_module from cmd line arguments. local_module = Module.from_func(self.workspace, mpi_module) module = local_module() module.set_inputs(**self.prepare_inputs()) module.set_parameters(**self.prepare_parameters()) status = module.run(use_docker=True) self.assertEqual(status, 'Completed', 'Module run failed.')
def test_module_from_func(self): # This test calls compare_two_models from cmd line arguments. local_module = Module.from_func(self.workspace, compare_two_models) module = local_module() module.set_inputs(**self.prepare_inputs()) module.set_parameters(**self.prepare_parameters()) status = module.run(working_dir=str(self.base_path), use_docker=True) self.assertEqual(status, 'Completed', 'Module run failed.')
def test_relative(self): local_module = Module.from_func(self.workspace, basic_module) module = local_module() with _change_working_dir(Path(__file__).parent.parent): module.set_inputs(input_dir='data/basic_module/inputs/input_dir') module.set_parameters(str_param='local_test') status = module.run(use_docker=False) self.assertEqual(status, 'Completed', 'Module run failed.')