Package qm :: Package test :: Package classes :: Module text_result_stream :: Class TextResultStream
[hide private]
[frames] | no frames]

Class TextResultStream
source code

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

A 'TextResultStream' displays test results textually.

A 'TextResultStream' displays information textually, in human readable form. This 'ResultStream' is used when QMTest is run without a graphical user interface.

Nested Classes [hide private]

Inherited from extension.Extension: Type, __metaclass__


Instance Methods [hide private]
  __init__(self, arguments=None, **args)
Construct a 'TextResultStream'.
  WriteResult(self, result)
Output a test or resource result.
  Summarize(self)
Output summary information about the results.
  _DisplayStatistics(self)
Write out statistical information about the results.
  _SummarizeTestStats(self)
Generate statistics about the overall results.
  _SummarizeRelativeTestStats(self)
Generate statistics showing results relative to expectations.
  _FormatStatistics(self, format)
Output statistical information.
  _SummarizeResults(self, results)
Summarize each of the results.
  _DisplayResult(self, result, format)
Display 'result'.
  _DisplayAnnotations(self, result)
Display the annotations associated with 'result'.
  _WriteOutcome(self, name, kind, outcome, expected_outcome=None)
Write a line indicating the outcome of a test or resource.
  _DisplayHeading(self, heading)
Display 'heading'.

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  
_argument_dictionary  
_argument_list  
format  
statistics_format  

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 

Construct a 'TextResultStream'.

'args' -- As for 'Extension.__init__'.
Overrides: file_result_stream.FileResultStream.__init__

WriteResult(self, result)

source code 

Output a test or resource result.

'result' -- A 'Result'.
Overrides: result_stream.ResultStream.WriteResult

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.
Overrides: result_stream.ResultStream.Summarize

_DisplayStatistics(self)

source code 

Write out statistical information about the results.

Write out statistical information about the results.

_SummarizeTestStats(self)

source code 
Generate statistics about the overall results.

_SummarizeRelativeTestStats(self)

source code 
Generate statistics showing results relative to expectations.

_FormatStatistics(self, format)

source code 

Output statistical information.

'format' -- A format string with (optional) fill-ins corresponding to statistical information.

The formatted string is written to the result file.

_SummarizeResults(self, results)

source code 

Summarize each of the results.

'results' -- The sequence of 'Result' objects to summarize.

_DisplayResult(self, result, format)

source code 

Display 'result'.

'result' -- The 'Result' of a test or resource execution.

'format' -- The format to use when displaying results.

_DisplayAnnotations(self, result)

source code 

Display the annotations associated with 'result'.

'result' -- The 'Result' to dispay.

_WriteOutcome(self, name, kind, outcome, expected_outcome=None)

source code 

Write a line indicating the outcome of a test or resource.

'name' -- The name of the test or resource.

'kind' -- The kind of result being displayed.

'outcome' -- A string giving the outcome.

'expected_outcome' -- If not 'None', the expected outcome.

_DisplayHeading(self, heading)

source code 

Display 'heading'.

'heading' -- The string to use as a heading for the next section of the report.

Class Variable Details [hide private]

arguments

Value:
[<<class 'qm.fields.EnumerationField'> format>,
 <<class 'qm.fields.TextField'> statistics_format>]                    
      

_argument_dictionary

Value:
{'expected_outcomes': <<class 'qm.fields.PythonField'> expected_outcom\
es>,
 'file': <<class 'qm.fields.PythonField'> file>,
 'filename': <<class 'qm.fields.TextField'> filename>,
 'format': <<class 'qm.fields.EnumerationField'> format>,
 'statistics_format': <<class 'qm.fields.TextField'> statistics_format\
>}                                                                     
      

_argument_list

Value:
[<<class 'qm.fields.PythonField'> expected_outcomes>,
 <<class 'qm.fields.EnumerationField'> format>,
 <<class 'qm.fields.TextField'> statistics_format>,
 <<class 'qm.fields.PythonField'> file>,
 <<class 'qm.fields.TextField'> filename>]                             
      

format

Value:
'brief'                                                                
      

statistics_format

Value:
''