Package qm :: Package test :: Package classes :: Module dejagnu_stream :: Class DejaGNUStream
[hide private]
[frames] | no frames]

Class DejaGNUStream

source code

                 object --+            
                          |            
        extension.Extension --+        
                              |        
     result_stream.ResultStream --+    
                                  |    
file_result_stream.FileResultStream --+
                                      |
                                     DejaGNUStream

A 'DejaGNUStream' formats its output like DejaGNU.

Nested Classes [hide private]

Inherited from extension.Extension: Type, __metaclass__

Instance Methods [hide private]
 
__init__(self, arguments=None, **args)
Construct a new 'Extension'.
source code
 
WriteResult(self, result)
Output a test result.
source code
 
Summarize(self)
Output summary information about the results.
source code

Inherited from result_stream.ResultStream: WriteAllAnnotations, WriteAnnotation

Inherited from extension.Extension: GetClassName, GetExplicitArguments, MakeDomDocument, MakeDomElement, Write, __getattr__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  arguments = [qm.fields.BooleanField(name= "show_expected_outco...
A list of the arguments to the extension class.
  __summary_outcomes = [DejaGNUTest.PASS, DejaGNUTest.FAIL, Deja...
The outcomes for which summary output should be produced.
  __outcome_descs = {DejaGNUTest.PASS: "expected passes", DejaGN...
A map from DejaGNU outcomes to descriptions.
  __expected_outcomes = DejaGNUTest.PASS, DejaGNUTest.KFAIL, Dej...
The DejaGNU outcomes that are considered "expected" results.

Inherited from file_result_stream.FileResultStream: file, filename

Inherited from result_stream.ResultStream: expected_outcomes, kind

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, arguments=None, **args)
(Constructor)

source code 

Construct a new 'Extension'.

'args': Keyword arguments providing values for Extension parameters. The values should be appropriate for the corresponding fields. Derived classes must pass along any unrecognized keyword arguments to this method so that additional arguments can be added in the future without necessitating changes to derived classes.

This method will place all of the arguments into this objects instance dictionary.

Derived classes may override this method, but should call this method during their processing.

Overrides: object.__init__
(inherited documentation)

WriteResult(self, result)

source code 

Output a test result.

Subclasses must override this method; the default implementation raises a 'NotImplementedError'.

'result' -- A 'Result'.

Overrides: result_stream.ResultStream.WriteResult
(inherited documentation)

Summarize(self)

source code 

Output summary information about the results.

When this method is called, the test run is complete. Summary information should be displayed for the user, if appropriate. Any finalization, such as the closing of open files, should also be performed at this point.

Derived class methods may override this method. They should, however, invoke this version before returning.

Overrides: result_stream.ResultStream.Summarize
(inherited documentation)

Class Variable Details [hide private]

arguments

A list of the arguments to the extension class.

Each element of this list should be an instance of 'Field'. The 'Field' instance describes the argument.

Derived classes may redefine this class variable. However, derived classes should not explicitly include the arguments from base classes; QMTest will automatically combine all the arguments found throughout the class hierarchy.

Value:
[qm.fields.BooleanField(name= "show_expected_outcomes", title= "Show E\
xpected Outcomes", description= """True if expected outcomes should be\
 displayed.

            By default, only information about unexpected outcomes is
            displayed.""", default_value= "false")]

__summary_outcomes

The outcomes for which summary output should be produced.

Value:
[DejaGNUTest.PASS, DejaGNUTest.FAIL, DejaGNUTest.KFAIL, DejaGNUTest.KP\
ASS, DejaGNUTest.XPASS, DejaGNUTest.XFAIL, DejaGNUTest.UNRESOLVED, Dej\
aGNUTest.UNTESTED, DejaGNUTest.UNSUPPORTED]

__outcome_descs

A map from DejaGNU outcomes to descriptions.

See 'init_testcounts' in the DejaGNU distribution for the code emulated by this table.

Value:
{DejaGNUTest.PASS: "expected passes", DejaGNUTest.FAIL: "unexpected fa\
ilures", DejaGNUTest.KPASS: "unexpected successes", DejaGNUTest.KFAIL:\
 "expected failures", DejaGNUTest.XPASS: "unexpected successes", DejaG\
NUTest.XFAIL: "expected failures", DejaGNUTest.UNRESOLVED: "unresolved\
 testcases", DejaGNUTest.UNTESTED: "untested testcases", DejaGNUTest.U\
NSUPPORTED: "unsupported tests",}

__expected_outcomes

The DejaGNU outcomes that are considered "expected" results.

DejaGNU results with these outcomes are not displayed unless 'show_expected_outcomes' is true.

Value:
DejaGNUTest.PASS, DejaGNUTest.KFAIL, DejaGNUTest.XFAIL, DejaGNUTest.UN\
RESOLVED, DejaGNUTest.UNSUPPORTED, DejaGNUTest.UNTESTED