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)
  WriteResult(self, result)
Output a test result.
  Summarize(self)
Output summary information about the results.

Inherited from result_stream.ResultStream: WriteAllAnnotations, WriteAnnotation

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

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


Class Variables [hide private]
arguments A list of the arguments to the extension class.
__summary_outcomes The outcomes for which summary output should be produced.
__outcome_descs A map from DejaGNU outcomes to descriptions.
__expected_outcomes The DejaGNU outcomes that are considered "expected" results.
_argument_dictionary  
_argument_list  
show_expected_outcomes  

Inherited from file_result_stream.FileResultStream: file, filename

Inherited from result_stream.ResultStream: expected_outcomes, kind

Inherited from object: __class__


Method Details [hide private]

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

source code 
Overrides: file_result_stream.FileResultStream.__init__

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:
[<<class 'qm.fields.BooleanField'> show_expected_outcomes>]            
      

__summary_outcomes

The outcomes for which summary output should be produced.
Value:
['PASS',
 'FAIL',
 'KFAIL',
 'KPASS',
 'XPASS',
 'XFAIL',
 'UNRESOLVED',
 'UNTESTED',
...                                                                    
      

__outcome_descs

A map from DejaGNU outcomes to descriptions.

See 'init_testcounts' in the DejaGNU distribution for the code emulated by this table.
Value:
{'FAIL': 'unexpected failures',
 'KFAIL': 'expected failures',
 'KPASS': 'unexpected successes',
 'PASS': 'expected passes',
 'UNRESOLVED': 'unresolved testcases',
 'UNSUPPORTED': 'unsupported tests',
 'UNTESTED': 'untested testcases',
 'XFAIL': 'expected failures',
...                                                                    
      

__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:
('PASS', 'KFAIL', 'XFAIL', 'UNRESOLVED', 'UNSUPPORTED', 'UNTESTED')    
      

_argument_dictionary

Value:
{'expected_outcomes': <<class 'qm.fields.PythonField'> expected_outcom\
es>,
 'file': <<class 'qm.fields.PythonField'> file>,
 'filename': <<class 'qm.fields.TextField'> filename>,
 'show_expected_outcomes': <<class 'qm.fields.BooleanField'> show_expe\
cted_outcomes>}                                                        
      

_argument_list

Value:
[<<class 'qm.fields.PythonField'> expected_outcomes>,
 <<class 'qm.fields.BooleanField'> show_expected_outcomes>,
 <<class 'qm.fields.PythonField'> file>,
 <<class 'qm.fields.TextField'> filename>]                             
      

show_expected_outcomes

Value:
'false'