コード例 #1
0
ファイル: test_sge.py プロジェクト: rainavishal1/saliweb
 def test_sge_tasks_valid(self):
     """Check the _SGETasks class with valid input"""
     t = _SGETasks('-t 27')
     self.assertEqual((t.first, t.last, t.step), (27, 27, 1))
     t = _SGETasks('-t 4-10')
     self.assertEqual((t.first, t.last, t.step), (4, 10, 1))
     t = _SGETasks('-t 4-10:2')
     self.assertEqual((t.first, t.last, t.step), (4, 10, 2))
コード例 #2
0
 def test_sge_tasks_valid(self):
     """Check the _SGETasks class with valid input"""
     t = _SGETasks('-t 27')
     self.assertEqual((t.first, t.last, t.step), (27, 27, 1))
     t = _SGETasks('-t 4-10')
     self.assertEqual((t.first, t.last, t.step), (4, 10, 1))
     t = _SGETasks('-t 4-10:2')
     self.assertEqual((t.first, t.last, t.step), (4, 10, 2))
コード例 #3
0
ファイル: test_sge.py プロジェクト: rainavishal1/saliweb
 def test_sge_tasks_run_get(self):
     """Check the _SGETasks.get_run_id() method"""
     t = _SGETasks('-t 4-10:2')
     self.assertEqual(t.get_run_id(['foo.4', 'foo.6', 'foo.8', 'foo.10']),
                      'foo.4-10:2')
     t = _SGETasks('-t 1-3')
     self.assertEqual(t.get_run_id(['foo.1', 'foo.2', 'foo.3']),
                      'foo.1-3:1')
     t = _SGETasks('-t 4-10:2')
     self.assertRaises(ValueError, t.get_run_id,
                       ['foo.1', 'foo.2', 'foo.3'])
コード例 #4
0
 def test_sge_tasks_run_get(self):
     """Check the _SGETasks.get_run_id() method"""
     t = _SGETasks('-t 4-10:2')
     self.assertEqual(t.get_run_id(['foo.4', 'foo.6', 'foo.8', 'foo.10']),
                      'foo.4-10:2')
     t = _SGETasks('-t 1-3')
     self.assertEqual(t.get_run_id(['foo.1', 'foo.2', 'foo.3']),
                      'foo.1-3:1')
     t = _SGETasks('-t 4-10:2')
     self.assertRaises(ValueError, t.get_run_id,
                       ['foo.1', 'foo.2', 'foo.3'])
コード例 #5
0
ファイル: test_sge.py プロジェクト: rainavishal1/saliweb
 def test_sge_tasks_none(self):
     """Check the _SGETasks class with no subtasks"""
     for s in ('', '-o foo -p bar'):
         t = _SGETasks(s)
         self.assert_(not t)
コード例 #6
0
 def test_sge_tasks_none(self):
     """Check the _SGETasks class with no subtasks"""
     for s in ('', '-o foo -p bar'):
         t = _SGETasks(s)
         self.assert_(not t)