Back to index

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

List of all members.

Public Member Functions

def testdelimiters
def testemptyline
def testnodelimiter
def parse

Detailed Description

Definition at line 45 of file test_text_csv.py.


Member Function Documentation

def test_text_csv.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 23 of file test_text_csv.py.

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

Here is the call graph for this function:

Here is the caller graph for this function:

parser.text_csv: delimiter , 

Definition at line 47 of file test_text_csv.py.

00047 
00048     def testdelimiters(self):
00049         """ parser.text_csv: delimiter , """
00050         result = self.parse('a,b')
00051         assert '<td class="hcolumn0"><strong>a</strong></td>' in  result and '<td class="hcolumn1"><strong>b</strong></td>' in  result

Here is the call graph for this function:

parser.text_csv: empty line 

Definition at line 52 of file test_text_csv.py.

00052 
00053     def testemptyline(self):
00054         """ parser.text_csv: empty line """
00055         result = self.parse('')
00056         assert '<tbody><tr></tr>\n</tbody>' in  result

Here is the call graph for this function:

parser.text_csv: line without delimiter 

Definition at line 57 of file test_text_csv.py.

00057 
00058     def testnodelimiter(self):
00059         """ parser.text_csv: line without delimiter """
00060         result = self.parse('ABCDEFGHIJ')
00061         assert '<td class="hcolumn0"><strong>ABCDEFGHIJ</strong></td>' in  result

Here is the call graph for this function:


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