Back to index

enigmail  1.4.3
Public Member Functions | Static Public Attributes
parsertests.VariableTest Class Reference
Inheritance diagram for parsertests.VariableTest:
Inheritance graph
Collaboration diagram for parsertests.VariableTest:
Collaboration graph

List of all members.

Public Member Functions

def runTest
def assertEqual

Static Public Attributes

string testdata
dictionary expected

Detailed Description

Definition at line 243 of file

Member Function Documentation

def parsertests.TestBase.assertEqual (   self,
  msg = "" 
) [inherited]
Actually print the values which weren't equal, if things don't work out!

Definition at line 16 of file

00017     def assertEqual(self, a, b, msg=""):
00018         """Actually print the values which weren't equal, if things don't work out!"""
00019         unittest.TestCase.assertEqual(self, a, b, "%s got %r expected %r" % (msg, a, b))

Definition at line 262 of file

00263     def runTest(self):
00264         stmts = pymake.parser.parsestring(self.testdata, 'VariableTest')
00266         m =
00267         stmts.execute(m)
00268         for k, v in self.expected.iteritems():
00269             flavor, source, val = m.variables.get(k)
00270             if val is None:
00271                 self.assertEqual(val, v, 'variable named %s' % k)
00272             else:
00273                 self.assertEqual(val.resolvestr(m, m.variables), v, 'variable named %s' % k)

Here is the call graph for this function:

Member Data Documentation

dictionary parsertests.VariableTest.expected [static]
Initial value:
{'VAR': 'value',
                'VARNAME': 'newname',
                'TESTVAR': 'testvalue',
                'TESTVAL': 'moretesting',
                'IMM': 'TESTVAR ',
                'MULTIVAR': 'val1 val2',
                'UNDEF': None}

Definition at line 254 of file

Initial value:
VAR = value
$(VARNAME) = testvalue
$(VARNAME:VAR=VAL) = moretesting
IMM := $(VARNAME) # this is a comment
MULTIVAR = val1 \\
VARNAME = newname

Definition at line 244 of file

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