def __init__(self, path, args): super(DataImportTask, self).__init__(path, args) self.set_name(DataImportTask.TASK_NAME) makeblast = MakeBlastDBTask('', args) self.set_stage(makeblast.get_stage() + 1) self.set_status(D3RTask.UNKNOWN_STATUS) self._maxretries = 3 self._retrysleep = 1
def test_constructor(self): params = D3RParameters() task = MakeBlastDBTask('/foo', params) self.assertEqual(task.get_name(), 'makeblastdb') self.assertEqual(task.get_stage(), 1) self.assertEqual(task.get_status(), D3RTask.UNKNOWN_STATUS) self.assertEqual(task.get_path(), '/foo') self.assertEqual(task.get_dir_name(), 'stage.1.makeblastdb') test_task.try_update_status_from_filesystem(self, task)