Back to index

enigmail  1.4.3
Public Member Functions | Public Attributes
mozunit._MozTestResult Class Reference

List of all members.

Public Member Functions

def __init__
def getDescription
def addSuccess
def addError
def addFailure
def printFail
def printErrorList

Public Attributes

 stream
 descriptions

Detailed Description

Definition at line 16 of file mozunit.py.


Constructor & Destructor Documentation

def mozunit._MozTestResult.__init__ (   self,
  stream,
  descriptions 
)

Definition at line 17 of file mozunit.py.

00017 
00018     def __init__(self, stream, descriptions):
00019         _TestResult.__init__(self)
00020         self.stream = stream
00021         self.descriptions = descriptions


Member Function Documentation

def mozunit._MozTestResult.addError (   self,
  test,
  err 
)

Definition at line 34 of file mozunit.py.

00034 
00035     def addError(self, test, err):
00036         _TestResult.addError(self, test, err)
00037         self.printFail(test, err)

Here is the call graph for this function:

def mozunit._MozTestResult.addFailure (   self,
  test,
  err 
)

Definition at line 38 of file mozunit.py.

00038 
00039     def addFailure(self, test, err):
00040         _TestResult.addFailure(self, test, err)
00041         self.printFail(test,err)

Here is the call graph for this function:

def mozunit._MozTestResult.addSuccess (   self,
  test 
)

Definition at line 28 of file mozunit.py.

00028 
00029     def addSuccess(self, test):
00030         _TestResult.addSuccess(self, test)
00031         filename = inspect.getfile(test.__class__)
00032         testname = test._testMethodName
00033         self.stream.writeln("TEST-PASS | %s | %s" % (filename, testname))

def mozunit._MozTestResult.getDescription (   self,
  test 
)

Definition at line 22 of file mozunit.py.

00022 
00023     def getDescription(self, test):
00024         if self.descriptions:
00025             return test.shortDescription() or str(test)
00026         else:
00027             return str(test)

Here is the caller graph for this function:

Definition at line 53 of file mozunit.py.

00053 
00054     def printErrorList(self):
00055         for test, err in self.errors:
00056             self.stream.writeln("ERROR: %s" % self.getDescription(test))
00057             self.stream.writeln("%s" % err)
00058 

Here is the call graph for this function:

def mozunit._MozTestResult.printFail (   self,
  test,
  err 
)

Definition at line 42 of file mozunit.py.

00042 
00043     def printFail(self, test, err):
00044         exctype, value, tb = err
00045         # Skip test runner traceback levels
00046         while tb and self._is_relevant_tb_level(tb):
00047             tb = tb.tb_next
00048         if not tb:
00049             self.stream.writeln("TEST-UNEXPECTED-FAIL | NO TRACEBACK |")
00050         _f, _ln, _t = inspect.getframeinfo(tb)[:3]
00051         self.stream.writeln("TEST-UNEXPECTED-FAIL | %s | line %d, %s: %s" % 
00052                             (_f, _ln, _t, value.message))

Here is the caller graph for this function:


Member Data Documentation

Definition at line 20 of file mozunit.py.

Definition at line 19 of file mozunit.py.


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