Package qm :: Package test :: Package classes :: Module sql_result_stream :: Class SQLResultStream
[hide private]
[frames] | no frames]

Class SQLResultStream
source code

            object --+        
                     |        
   extension.Extension --+    
                         |    
result_stream.ResultStream --+
                             |
            object --+       |
                     |       |
   extension.Extension --+   |
                         |   |
             _SQLConnected --+
                             |
                            SQLResultStream

A 'SQLResultStream' writes results out to an SQL database.

This class currently supports PostgreSQL only.

Nested Classes [hide private]

Inherited from extension.Extension: Type, __metaclass__


Instance Methods [hide private]
  __init__(self, arguments=None, **args)
  WriteAnnotation(self, key, value)
Output an annotation for this run.
  WriteResult(self, result)
Output a test result.
  Summarize(self)
Output summary information about the results.

Inherited from result_stream.ResultStream: WriteAllAnnotations

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]
_argument_dictionary  
_argument_list  

Inherited from result_stream.ResultStream: expected_outcomes, kind

Inherited from _SQLConnected: arguments, connection, db_module, db_name

Inherited from object: __class__


Method Details [hide private]

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

source code 
Overrides: result_stream.ResultStream.__init__

WriteAnnotation(self, key, value)

source code 

Output an annotation for this run.

Subclasses should override this if they want to store/display annotations; the default implementation simply discards them.

'key' -- the key value as a string.

'value' -- the value of this annotation as a string.
Overrides: result_stream.ResultStream.WriteAnnotation
(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]

_argument_dictionary

Value:
{'connection': <<class 'qm.fields.PythonField'> connection>,
 'db_module': <<class 'qm.fields.TextField'> db_module>,
 'db_name': <<class 'qm.fields.TextField'> db_name>,
 'expected_outcomes': <<class 'qm.fields.PythonField'> expected_outcom\
es>}                                                                   
      

_argument_list

Value:
[<<class 'qm.fields.TextField'> db_module>,
 <<class 'qm.fields.PythonField'> expected_outcomes>,
 <<class 'qm.fields.PythonField'> connection>,
 <<class 'qm.fields.TextField'> db_name>]