def execute_workflow(self): make_path_to(self.stderr_log_file) make_path_to(self.stdout_log_file) with open(self.stderr_log_file, 'a') as stderr: with open(self.stdout_log_file, 'a') as stdout: rv = subprocess.call(self.command_line, stderr=stderr, stdout=stdout) self.assertEqual(0, rv)
def execute_workflow(self): shutil.rmtree(self.log_dir, ignore_errors=True) make_path_to(self.stderr_log_file) make_path_to(self.stdout_log_file) with open(self.stderr_log_file, 'a') as stderr: with open(self.stdout_log_file, 'a') as stdout: rv = subprocess.call(self.command_line, stderr=stderr, stdout=stdout) self.assertEqual(1, rv, 'Workflow crashed as expected')