All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Common.TestResult Class Reference
Inheritance diagram for Common.TestResult:
Collaboration diagram for Common.TestResult:

Public Member Functions

def __init__
 
def xmlElement
 

Public Attributes

 name
 
 status
 
 data
 

Detailed Description

Class used to group details about a test execution.

Definition at line 3 of file Common.py.

Constructor & Destructor Documentation

def Common.TestResult.__init__ (   self,
  name,
  kwargs 
)

Definition at line 7 of file Common.py.

7 
8  def __init__(self, name, **kwargs):
9  self.name = name
10  self.status = kwargs.pop('status', 'untested')
11  self.data = kwargs

Member Function Documentation

def Common.TestResult.xmlElement (   self)
Return an etree element representing the test result.

Definition at line 12 of file Common.py.

12 
13  def xmlElement(self):
14  '''
15  Return an etree element representing the test result.
16  '''
17  import xml.etree.ElementTree as ET
18  elem = ET.Element('Test', Status=self.status)
19  ET.SubElement(elem, 'Name').text = self.name
20  results = ET.SubElement(elem, 'Results')
21  return elem

Member Data Documentation

Common.TestResult.data

Definition at line 10 of file Common.py.

Common.TestResult.name

Definition at line 8 of file Common.py.

Common.TestResult.status

Definition at line 9 of file Common.py.


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