changeset 5653:b82318102f22

fix failing tests in pep8, moin and creole parsers dues to changes in highlight.py
author Radomir Dopieralski <moindev@sheep.art.pl>
date Mon, 05 Apr 2010 23:37:24 +0200
parents 14fd7e416807
children 63016f784d88
files MoinMoin/parser/_tests/test_text_creole.py MoinMoin/parser/_tests/test_text_moin_wiki.py MoinMoin/parser/highlight.py
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/_tests/test_text_creole.py	Mon Apr 05 16:21:23 2010 +0200
+++ b/MoinMoin/parser/_tests/test_text_creole.py	Mon Apr 05 23:37:24 2010 +0200
@@ -280,7 +280,7 @@
 """
         for test, blockstart in self.cases:
             # We dont test here formatter white space generation
-            expected = r'<p.*?>AAA\s*</p>\s*%s' % blockstart
+            expected = r'<p.*?>AAA\s*</p>\s*(<span.*?></span>\s*)?%s' % blockstart
             needle = re.compile(expected, re.MULTILINE)
             result = self.parse(text % test)
             assert needle.search(result)
--- a/MoinMoin/parser/_tests/test_text_moin_wiki.py	Mon Apr 05 16:21:23 2010 +0200
+++ b/MoinMoin/parser/_tests/test_text_moin_wiki.py	Mon Apr 05 23:37:24 2010 +0200
@@ -392,7 +392,7 @@
 """
         for test, blockstart in self.cases:
             # We dont test here formatter white space generation
-            expected = r'<p.*?>AAA\s*\n*%s' % blockstart
+            expected = r'<p.*?>AAA\s*\n*(<span.*?></span>\s*\n*)?%s' % blockstart
             needle = re.compile(expected, re.MULTILINE)
             result = self.parse(text % test)
             print expected, result
--- a/MoinMoin/parser/highlight.py	Mon Apr 05 16:21:23 2010 +0200
+++ b/MoinMoin/parser/highlight.py	Mon Apr 05 23:37:24 2010 +0200
@@ -104,7 +104,7 @@
         self.result.append(fmt.code_line(0))
 
     def format(self, tokensource, outfile):
-        fmt = self.formatter    
+        fmt = self.formatter
         self.lineno = self.start_line
         line_parts = []
         for ttype, value in tokensource:
@@ -121,7 +121,7 @@
                     if class_:
                         line_parts.append(fmt.code_token(0, class_))
         if line_parts and line_parts != [u'']: # Don't output an empty line at the end.
-            self.add_next_line(line_parts)            
+            self.add_next_line(line_parts)
 
 
 class Parser: