Package inca :: Module SimpleUnitReporter :: Class SimpleUnitReporter
[hide private]
[frames] | no frames]

Class SimpleUnitReporter

source code

Reporter.Reporter --+
                    |
                   SimpleUnitReporter

SimpleUnitReporter - Module for creating simple unit reporters

from inca.SimpleUnitReporter import SimpleUnitReporter
reporter = SimpleUnitReporter(
  name = 'Reporter Name',
  version = 0.1,
  description = 'A really helpful reporter description',
  url = 'http://url.to.more.reporter.info'
  unit_name = 'What this reporter tests'
)

This module is a subclass of Reporter that provides convenience methods
for testing the successful operation of a software package.  If the test
completes, the report body contains

<unitTest>
  <ID>unitX</ID>
</unitTest>

Otherwise, the exit_status of the report is set to false.

Instance Methods [hide private]
 
__init__(self, **attributes)
Class constructor that returns a new SimpleUnitReporter object.
source code
 
getUnitName(self)
Return the name of the unit being tested.
source code
 
reportBody(self)
Constructs and returns the body of the reporter.
source code
 
setUnitName(self, name)
Set the name of the unit being tested to name.
source code
 
unitFailure(self, msg)
Sets the result of this unit test to be failed with failure message msg.
source code
 
unitSuccess(self)
Sets the result of this unit test to be successful.
source code

Inherited from Reporter.Reporter: __del__, addArg, addDependency, argValue, argValues, compiledProgramOutput, compiledProgramStatusOutput, failPrintAndExit, getBody, getCompleted, getCwd, getDescription, getFailMessage, getName, getUrl, getVersion, log, loggedCommandOutput, loggedCommandStatusOutput, printReport, processArgv, report, setBody, setCompleted, setCwd, setDescription, setFailMessage, setName, setResult, setUrl, setVersion, tempFile, xmlElement

Method Details [hide private]

__init__(self, **attributes)
(Constructor)

source code 
Class constructor that returns a new SimpleUnitReporter object.  The
constructor supports the following parameter in addition to those
supported by Reporter.

unit_name
  the name of the unit being tested; default ''.

Overrides: Reporter.Reporter.__init__

reportBody(self)

source code 

Constructs and returns the body of the reporter.

Overrides: Reporter.Reporter.reportBody