Back to index

enigmail  1.4.3
Public Member Functions | Static Public Attributes
parsertests.IterTest Class Reference
Inheritance diagram for parsertests.IterTest:
Inheritance graph
[legend]
Collaboration diagram for parsertests.IterTest:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def runSingle
def assertEqual

Static Public Attributes

dictionary testdata

Detailed Description

Definition at line 75 of file parsertests.py.


Member Function Documentation

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

Definition at line 16 of file parsertests.py.

00016 
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))

def parsertests.IterTest.runSingle (   self,
  ifunc,
  idata,
  expected 
)

Definition at line 129 of file parsertests.py.

00129 
00130     def runSingle(self, ifunc, idata, expected):
00131         d = pymake.parser.Data.fromstring(idata, 'IterTest data')
00132 
00133         it = pymake.parser._alltokens.finditer(d.s, 0, d.lend)
00134         actual = ''.join( [c for c, t, o, oo in ifunc(d, 0, ('dummy-token',), it)] )
00135         self.assertEqual(actual, expected)
00136 
00137         if ifunc == pymake.parser.itermakefilechars:
00138             print "testing %r" % expected
00139             self.assertEqual(pymake.parser.flattenmakesyntax(d, 0), expected)
00140 
00141 multitest(IterTest)
00142 
00143 
00144 #         'define': (
00145 #             pymake.parser.iterdefinechars,
00146 #             "endef",
00147 #             ""
00148 #             ),
00149 #        'definenesting': (
00150 #            pymake.parser.iterdefinechars,
00151 #            """define BAR # comment
00152 #random text
00153 #endef not what you think!
00154 #endef # comment is ok\n""",
00155 #            """define BAR # comment
00156 #random text
00157 #endef not what you think!"""
00158 #            ),
00159 #        'defineescaped': (
00160 #            pymake.parser.iterdefinechars,
00161 #            """value   \\
00162 #endef
00163 #endef\n""",
00164 #            "value endef"
00165 #        ),

Here is the call graph for this function:


Member Data Documentation

dictionary parsertests.IterTest.testdata [static]

Definition at line 76 of file parsertests.py.


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