Back to index

moin  1.9.0~rc2
Public Member Functions | Static Public Attributes | Static Private Attributes
test_text_moin_wiki.TestTextFormatingTestCase Class Reference
Inheritance diagram for test_text_moin_wiki.TestTextFormatingTestCase:
Inheritance graph
Collaboration diagram for test_text_moin_wiki.TestTextFormatingTestCase:
Collaboration graph

List of all members.

Public Member Functions

def testTextFormating
def parse

Static Public Attributes

string text = 'AAA %s AAA'
tuple needle = re.compile(text % r'(.+)')

Static Private Attributes

tuple _tests

Detailed Description

Test wiki markup 

Definition at line 184 of file

Member Function Documentation

def test_text_moin_wiki.ParserTestCase.parse (   self,
) [inherited]
Parse body and return html

Create a page with body, then parse it and format using html formatter

Definition at line 26 of file

00027     def parse(self, body):
00028         """Parse body and return html
00030         Create a page with body, then parse it and format using html formatter
00031         """
00032         request = self.request
00033         assert body is not None
00034         request.reset()
00035         page = Page(request, PAGENAME)
00036         page.hilite_re = None
00037         page.set_raw_body(body)
00038         formatter = HtmlFormatter(request)
00039         formatter.setPage(page)
00040         page.formatter = formatter
00041         request.formatter = formatter
00042         parser = WikiParser(body, request, line_anchors=False)
00043         formatter.startContent('') # needed for _include_stack init
00044         output = request.redirectedOutput(parser.format, formatter)
00045         formatter.endContent('')
00046         return output

Here is the call graph for this function:

Here is the caller graph for this function: text formating 

Definition at line 201 of file

00202     def testTextFormating(self):
00203         """ text formating """
00204         for test, expected in self._tests:
00205             html = self.parse(self.text % test)
00206             result =
00207             assert result == expected

Here is the call graph for this function:

Member Data Documentation

Initial value:
        # test,                     expected
        ('no format',               'no format'),
        ("''em''",                  '<em>em</em>'),
        ("'''bold'''",              '<strong>bold</strong>'),
        ("__underline__",           '<span class="u">underline</span>'),
        ("'''''Mix''' at start''",  '<em><strong>Mix</strong> at start</em>'),
        ("'''''Mix'' at start'''",  '<strong><em>Mix</em> at start</strong>'),
        ("'''Mix at ''end'''''",    '<strong>Mix at <em>end</em></strong>'),
        ("''Mix at '''end'''''",    '<em>Mix at <strong>end</strong></em>'),

Definition at line 189 of file

tuple test_text_moin_wiki.TestTextFormatingTestCase.needle = re.compile(text % r'(.+)') [static]

Definition at line 188 of file

Definition at line 187 of file

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