Package qm :: Package test :: Package classes :: Module python :: Class ExecTest
[hide private]
[frames] | no frames]

Class ExecTest
source code

         object --+            
                  |            
extension.Extension --+        
                      |        
      runnable.Runnable --+    
                          |    
                  test.Test --+
                              |
                             ExecTest

Check that a Python expression evaluates to true.

An 'ExecTest' test consists of Python source code together with an (optional) Python expression. First the Python code is executed. If it throws an (uncaught) exception the test fails. If the optional expression is present, it is then evaluated. If it evaluates to false, the test fails. Otherwise, the test passes.

Nested Classes [hide private]

Inherited from test.Test: OutcomeField, TestField

Inherited from runnable.Runnable: ResourceField

Inherited from extension.Extension: Type, __metaclass__


Instance Methods [hide private]
  Run(self, context, result)
Run the test.

Inherited from test.Test: GetTargetGroup

Inherited from runnable.Runnable: GetAttachments, GetDatabase, GetId, __init__

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  
expression  
source  

Inherited from test.Test: PREREQUISITES_FIELD_ID, kind, prerequisites, target_group

Inherited from runnable.Runnable: EXTRA_DATABASE, EXTRA_ID, RESOURCE_FIELD_ID, resources

Inherited from object: __class__


Method Details [hide private]

Run(self, context, result)

source code 

Run the test.

'context' -- A 'Context' giving run-time parameters to the test.

'result' -- A 'Result' object. The outcome will be 'Result.PASS' when this method is called. The 'result' may be modified by this method to indicate outcomes other than 'Result.PASS' or to add annotations.

This method should not return a value.

Derived classes must override this method.
Overrides: test.Test.Run
(inherited documentation)

Class Variable Details [hide private]

arguments

Value:
[<<class 'qm.fields.TextField'> source>,
 <<class 'qm.fields.TextField'> expression>]                           
      

_argument_dictionary

Value:
{'expression': <<class 'qm.fields.TextField'> expression>,
 'prerequisites': <<class 'qm.fields.SetField'> prerequisites>,
 'resources': <<class 'qm.fields.SetField'> resources>,
 'source': <<class 'qm.fields.TextField'> source>,
 'target_group': <<class 'qm.test.test.TargetGroupField'> target_group\
>}                                                                     
      

_argument_list

Value:
[<<class 'qm.fields.SetField'> prerequisites>,
 <<class 'qm.fields.TextField'> source>,
 <<class 'qm.test.test.TargetGroupField'> target_group>,
 <<class 'qm.fields.TextField'> expression>,
 <<class 'qm.fields.SetField'> resources>]                             
      

expression

Value:
'1'                                                                    
      

source

Value:
'pass'