Back to index

enigmail  1.4.3
Public Member Functions | Public Attributes
unit-Expression.TestExpression Class Reference

List of all members.

Public Member Functions

def setUp
def test_string_literal
def test_variable
def test_not
def test_equals
def test_notequals

Public Attributes

 c

Detailed Description

Unit tests for the Expression class
evaluate() is called with a context {FAIL: 'PASS'}

Definition at line 31 of file unit-Expression.py.


Member Function Documentation

def unit-Expression.TestExpression.setUp (   self)

Definition at line 37 of file unit-Expression.py.

00037 
00038   def setUp(self):
00039     self.c = Context()
00040     self.c['FAIL'] = 'PASS'

def unit-Expression.TestExpression.test_equals (   self)
Test for the == operator

Definition at line 54 of file unit-Expression.py.

00054 
00055   def test_equals(self):
00056     """ Test for the == operator"""
00057     self.assert_(Expression('FAIL == PASS').evaluate(self.c))

def unit-Expression.TestExpression.test_not (   self)
Test for the ! operator

Definition at line 49 of file unit-Expression.py.

00049 
00050   def test_not(self):
00051     """Test for the ! operator"""
00052     self.assert_(Expression('!0').evaluate(self.c))
00053     self.assert_(not Expression('!1').evaluate(self.c))

def unit-Expression.TestExpression.test_notequals (   self)
Test for the != operator

Definition at line 58 of file unit-Expression.py.

00058 
00059   def test_notequals(self):
00060     """ Test for the != operator"""
00061     self.assert_(Expression('FAIL != 1').evaluate(self.c))

def unit-Expression.TestExpression.test_string_literal (   self)
Test for a string literal in an Expression

Definition at line 41 of file unit-Expression.py.

00041 
00042   def test_string_literal(self):
00043     """Test for a string literal in an Expression"""
00044     self.assertEqual(Expression('PASS').evaluate(self.c), 'PASS')

Here is the call graph for this function:

def unit-Expression.TestExpression.test_variable (   self)
Test for variable value in an Expression

Definition at line 45 of file unit-Expression.py.

00045 
00046   def test_variable(self):
00047     """Test for variable value in an Expression"""
00048     self.assertEqual(Expression('FAIL').evaluate(self.c), 'PASS')

Here is the call graph for this function:


Member Data Documentation

unit-Expression.TestExpression.c

Definition at line 38 of file unit-Expression.py.


The documentation for this class was generated from the following file: