GNUnet  0.11.x
Public Member Functions | Data Fields
gnunet_testing.FileExistCondition Class Reference
Inheritance diagram for gnunet_testing.FileExistCondition:
[legend]
Collaboration diagram for gnunet_testing.FileExistCondition:
[legend]

Public Member Functions

def __init__ (self, file)
 
def check (self)
 
def evaluate (self, failed_only)
 
- Public Member Functions inherited from gnunet_testing.Condition
def __init__ (self)
 
def __init__ (self, type)
 
def check (self)
 
def evaluate (self, failed_only)
 

Data Fields

 fulfilled
 
 type
 
 file
 
- Data Fields inherited from gnunet_testing.Condition
 fulfilled
 
 type
 

Detailed Description

Definition at line 132 of file gnunet_testing.py.

Constructor & Destructor Documentation

◆ __init__()

def gnunet_testing.FileExistCondition.__init__ (   self,
  file 
)

Definition at line 133 of file gnunet_testing.py.

133  def __init__(self, file):
134  self.fulfilled = False
135  self.type = 'file'
136  self.file = file
137 
def __init__(self, test, cfg_file)

Member Function Documentation

◆ check()

def gnunet_testing.FileExistCondition.check (   self)

Definition at line 138 of file gnunet_testing.py.

References gnunet_testing.FileExistCondition.file, GNUNET_FS_FileInformation.file, GNUNET_MESSENGER_MessageBody.file, gnunet_testing.Check.fulfilled, and gnunet_testing.Condition.fulfilled.

138  def check(self):
139  if (self.fulfilled == False):
140  res = os.path.isfile(self.file)
141  if (res == True):
142  self.fulfilled = True
143  return True
144  else:
145  return False
146  else:
147  return True
148 

◆ evaluate()

def gnunet_testing.FileExistCondition.evaluate (   self,
  failed_only 
)

Definition at line 149 of file gnunet_testing.py.

References gnunet_testing.FileExistCondition.file, GNUNET_FS_FileInformation.file, GNUNET_MESSENGER_MessageBody.file, gnunet_testing.Check.fulfilled, gnunet_testing.Condition.fulfilled, DataRecord.type, RecentRequest.type, LookupMessage.type, GSF_CadetRequest.type, GNUNET_GNS_LookupWithTldRequest.type, GNUNET_DHT_ClientGetMessage.type, MetaCounter.type, MigrationReadyBlock.type, GNUNET_IDENTITY_PrivateKey.type, GNUNET_FS_Uri.type, Value.type, GNUNET_BLOCK_Group.type, GNUNET_DNSPARSER_Query.type, gnunet_testing.Condition.type, GetKeyMessage.type, GNUNET_DHT_GetHandle.type, GNUNET_IDENTITY_PublicKey.type, GNUNET_SETI_Option.type, GNUNET_SETU_Option.type, ZeroAnonByType.type, PeerPutMessage.type, GNUNET_RECLAIM_Attribute.type, ClientQueryRecord.type, CadetQueryMessage.type, PutContext.type, ProcessContext.type, Network.type, GSF_PendingRequestData.type, GetMessage.type, GNUNET_IDENTITY_Signature.type, ClientMonitorRecord.type, GNUNET_DHT_ClientResultMessage.type, CadetReplyMessage.type, ProcessResultClosure.type, GNUNET_DHT_MonitorHandle.type, GNUNET_RECLAIM_Credential.type, PeerResultMessage.type, GetZeroAnonymityMessage.type, GNUNET_DHT_ClientPutMessage.type, GNUNET_RECLAIM_Presentation.type, GNUNET_SET_Option.type, GNUNET_ATS_TEST_Operation.type, DataMessage.type, PeerGetMessage.type, GNUNET_GNSRECORD_Block.type, TrafficGenerator.type, GNUNET_DHT_MonitorPutMessage.type, HandleReplyClosure.type, PreferenceGenerator.type, GetContext.type, SearchMessage.type, GNUNET_MessageHeader.type, GNUNET_DHT_MonitorStartStopMessage.type, PropertyGenerator.type, GNUNET_CADET_RequestDropCadetMessage.type, PutMessage.type, GNUNET_DHT_MonitorGetMessage.type, ClientPutMessage.type, GNUNET_DHT_MonitorGetRespMessage.type, CadetChannel.type, HttpResponseHeader.type, GNUNET_DNSPARSER_Record.type, GNUNET_MQ_MessageHandler.type, GNUNET_TUN_DnsQueryLine.type, GNUNET_TUN_DnsRecordLine.type, GNUNET_TUN_IcmpHeader.type, ProcessReplyClosure.type, ForwardReplyContext.type, TestExistClosure.type, and GNUNET_TESTBED_EventInformation.type.

149  def evaluate(self, failed_only):
150  if ((self.fulfilled == False) and (failed_only == True)):
151  logger.debug(
152  '%s confition for file %s was %s', str(self.type), self.file,
153  str(self.fulfilled)
154  )
155  elif (failed_only == False):
156  logger.debug(
157  '%s confition for file %s was %s', str(self.type), self.file,
158  str(self.fulfilled)
159  )
160  return self.fulfilled
161 
162 
static void evaluate(struct GNUNET_TIME_Relative duration_total)

Field Documentation

◆ fulfilled

gnunet_testing.FileExistCondition.fulfilled

Definition at line 134 of file gnunet_testing.py.

◆ type

gnunet_testing.FileExistCondition.type

Definition at line 135 of file gnunet_testing.py.

◆ file

gnunet_testing.FileExistCondition.file

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