Esempio n. 1
0
 def create_pipe_to_run(self):
     bp = BasePipe(job_name='job_name')
     bp.pbs_file = 'script.pbs'
     patcher = patch.object(os.path, 'isfile', return_value=True)
     self.mock_isfile = patcher.start()
     self.addCleanup(patcher.stop)
     return bp
Esempio n. 2
0
 def test_run_raises_OSError_if_pbs_file_not_found(self):
     bp = BasePipe()
     bp.pbs_file = 'script.pbs'
     with patch.object(os.path, 'isfile', return_value=False):
         with self.assertRaises(OSError):
             bp.run()