def test_run_jobs_qsub_error(self): names = ['benz; ls files.gjf'] gjfs = [''] job = 'sleep 0' results = interface.run_jobs( self.credential2, names, gjfs, jobstring=job) self.assertIn("qsub -", results["failed"][0][1])
def test_run_jobs(self): names = ['test', 'test2'] gjfs = ['', ''] job = 'sleep 0' results = interface.run_jobs( self.credential2, names, gjfs, jobstring=job) self.assertEqual(results["error"], None)
def test_run_jobs(self): names = ['test', 'test2'] gjfs = ['', ''] results = interface.run_jobs(self.credential2, names, gjfs, jobstring='sleep 0') self.assertEqual(results["error"], None)
def test_run_jobs_qsub_error(self): names = ['benz; ls files.gjf'] gjfs = [''] # first call is to mkdir self.mock_ssh.exec_command.side_effect = [ make_io_triplet(), make_io_triplet(stderr='qsub error'), ] results = interface.run_jobs( self.credential2, names, gjfs, jobstring='sleep 0') self.assertIn("qsub -", results["failed"][0][1])
def test_run_jobs_qsub_error(self): names = ['benz; ls files.gjf'] gjfs = [''] # first call is to mkdir self.mock_ssh.exec_command.side_effect = [ make_io_triplet(), make_io_triplet(stderr='qsub error'), ] results = interface.run_jobs(self.credential2, names, gjfs, jobstring='sleep 0') self.assertIn("qsub -", results["failed"][0][1])
def test_run_jobs_invalid_credential(self): results = interface.run_jobs(None, [], [], jobstring=None) self.assertEqual(results["error"], CRED_ERROR)
def test_run_jobs_staff_error(self): results = interface.run_jobs(self.credential, [], [], jobstring=None) self.assertEqual(results["error"], SUBMIT_ERROR)