Back to index

moin  1.9.0~rc2
Public Member Functions | Static Public Attributes | Static Private Attributes
test_text_creole.TestTextFormatingTestCase Class Reference
Inheritance diagram for test_text_creole.TestTextFormatingTestCase:
Inheritance graph
Collaboration diagram for test_text_creole.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 130 of file

Member Function Documentation

def test_text_creole.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 = page
00043         parser = CreoleParser(body, request, line_anchors=False)
00044         formatter.startContent('') # needed for _include_stack init
00045         output = request.redirectedOutput(parser.format, formatter)
00046         formatter.endContent('')
00047         return output

Here is the call graph for this function: text formating 

Definition at line 146 of file

00147     def testTextFormating(self):
00148         """ text formating """
00149         for test, expected in self._tests:
00150             html = self.parse(self.text % test)
00151             result =
00152             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>'),
        ("//**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 135 of file

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

Definition at line 134 of file

string test_text_creole.TestTextFormatingTestCase.text = 'AAA %s AAA' [static]

Definition at line 133 of file

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