Exemplo n.º 1
0
 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])
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 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])
Exemplo n.º 5
0
 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])
Exemplo n.º 6
0
 def test_run_jobs_invalid_credential(self):
     results = interface.run_jobs(None, [], [], jobstring=None)
     self.assertEqual(results["error"], CRED_ERROR)
Exemplo n.º 7
0
 def test_run_jobs_staff_error(self):
     results = interface.run_jobs(self.credential, [], [], jobstring=None)
     self.assertEqual(results["error"], SUBMIT_ERROR)
Exemplo n.º 8
0
 def test_run_jobs_invalid_credential(self):
     results = interface.run_jobs(None, [], [], jobstring=None)
     self.assertEqual(results["error"], CRED_ERROR)
Exemplo n.º 9
0
 def test_run_jobs_staff_error(self):
     results = interface.run_jobs(self.credential, [], [], jobstring=None)
     self.assertEqual(results["error"], SUBMIT_ERROR)