Back to index

moin  1.9.0~rc2
Public Member Functions
test_text_creole.TestRule Class Reference
Inheritance diagram for test_text_creole.TestRule:
Inheritance graph
[legend]
Collaboration diagram for test_text_creole.TestRule:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def testNotRule
def testStandardRule
def testLongRule
def parse

Detailed Description

Test rules markup 

Definition at line 243 of file test_text_creole.py.


Member Function Documentation

def test_text_creole.ParserTestCase.parse (   self,
  body 
) [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 test_text_creole.py.

00026 
00027     def parse(self, body):
00028         """Parse body and return html
00029 
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         request.page = 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
00048 

Here is the call graph for this function:

parser.wiki: ----- is no rule 

Definition at line 257 of file test_text_creole.py.

00257 
00258     def testLongRule(self):
00259         """ parser.wiki: ----- is no rule """
00260         test = '-----'
00261         result = self.parse(test)
00262         assert re.search(r'-----', result)
00263 

Here is the call graph for this function:

parser.wiki: --- is no rule 

Definition at line 246 of file test_text_creole.py.

00246 
00247     def testNotRule(self):
00248         """ parser.wiki: --- is no rule """
00249         result = self.parse('---')
00250         expected = '---' # inside <p>
00251         assert expected in result

Here is the call graph for this function:

parser.wiki: ---- is standard rule 

Definition at line 252 of file test_text_creole.py.

00252 
00253     def testStandardRule(self):
00254         """ parser.wiki: ---- is standard rule """
00255         result = self.parse('----')
00256         assert re.search(r'<hr.*?>', result)

Here is the call graph for this function:


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