Class SimpleUnitReporter
source code
Reporter.Reporter --+
|
SimpleUnitReporter
- Known Subclasses:
-
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.
|
|
__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
|
|
|
|
|
|
|
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
|
|
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__
|