コード例 #1
0
 def setUp(self):
     self.jt = jt = Session.createJobTemplate()
     jt.remoteCommand = 'python'
     jt.args = ['-c', "print('hello from python!')"]
     if hasattr(self, 'jt_tweaks'):
         self.jt_tweaks()
     self.jid = Session.runJob(jt)
コード例 #2
0
ファイル: testcontext.py プロジェクト: eronisko/drmaa-python
def test_with_jt():
    """'with' statement works with JobTemplate"""
    s = Session()
    s.initialize()
    with s.createJobTemplate() as jt:
        jt.remoteCommand = 'sleep'
        jt.args = ['10']
        jid = s.runJob(jt)
        print(s.wait(jid))
    s.exit()
コード例 #3
0
 def xtest_tmp(self):
     self.test_scalar_attributes()
     self.jt.args = ['.colordb']
     jid = Session.runJob(self.jt)
     jinfo = Session.wait(jid)
     print(jinfo)