Belle II Software development
TestClusterControlDrmaa.SessionMock Class Reference

Classes

class  JobState
 

Public Member Functions

def __enter__ (self)
 
def __exit__ (self, exc, value, tb)
 
def createJobTemplate (self)
 
def runJob (self, jt)
 
def jobStatus (self, jt)
 
def deleteJobTemplate (self, jt)
 

Static Public Attributes

JobState jobStatusReturn = JobState.RUNNING
 the job state this session mock will return
 

Detailed Description

Class to mock a DRMAA session

Definition at line 26 of file test_clustercontroldrmaa.py.

Member Function Documentation

◆ __enter__()

def __enter__ (   self)
 to support python with syntax

Definition at line 46 of file test_clustercontroldrmaa.py.

46 def __enter__(self):
47 """ to support python with syntax"""
48 return self
49

◆ __exit__()

def __exit__ (   self,
  exc,
  value,
  tb 
)
 to support python with syntax

Definition at line 50 of file test_clustercontroldrmaa.py.

50 def __exit__(self, exc, value, tb):
51 """ to support python with syntax"""
52

◆ createJobTemplate()

def createJobTemplate (   self)
fake creating job template

Definition at line 53 of file test_clustercontroldrmaa.py.

53 def createJobTemplate(self):
54 """fake creating job template"""
55 return MagicMock()
56

◆ deleteJobTemplate()

def deleteJobTemplate (   self,
  jt 
)
fake job deletion

Definition at line 65 of file test_clustercontroldrmaa.py.

65 def deleteJobTemplate(self, jt):
66 """fake job deletion"""
67 return MagicMock()
68
69 def test_no_drmaa(self):

◆ jobStatus()

def jobStatus (   self,
  jt 
)
fake job status terun

Definition at line 61 of file test_clustercontroldrmaa.py.

61 def jobStatus(self, jt):
62 """fake job status terun"""
63 return self.jobStatusReturn
64

◆ runJob()

def runJob (   self,
  jt 
)
fake job running

Definition at line 57 of file test_clustercontroldrmaa.py.

57 def runJob(self, jt):
58 """fake job running"""
59 return MagicMock()
60

Member Data Documentation

◆ jobStatusReturn

JobState jobStatusReturn = JobState.RUNNING
static

the job state this session mock will return

Definition at line 44 of file test_clustercontroldrmaa.py.


The documentation for this class was generated from the following file: