Waylan Limberg committed 3f4413a

Cleaned up some names for cleaner, more consistant result and code in testing framework.

Comments (0)

Files changed (3)


 import difflib
 import nose
 import util 
-from plugins import MdSyntaxError, HtmlOutput, MdSyntaxErrorPlugin
+from plugins import HtmlOutput, Markdown
 from test_apis import *
 test_dir = os.path.abspath(os.path.dirname(__file__))
                                             output, output_file, 
                                             'actual_output.html', n=3)]
     if diff:
-        raise util.MdSyntaxError('Output from "%s" failed to match expected '
-                                 'output.\n\n%s' % (input_file, ''.join(diff)))
+        raise util.MarkdownSyntaxError('Output from "%s" failed to match expected '
+                                       'output.\n\n%s' % (input_file, ''.join(diff)))
-def test_markdown_syntax():
+def TestSyntax():
     for dir_name, sub_dirs, files in os.walk(test_dir):
         # Get dir specific config settings.
         config = util.CustomConfigParser({'extensions': '', 
             if ext == '.txt':
                 yield check_syntax, os.path.join(dir_name, root), config
-nose.main(addplugins=[HtmlOutput(), MdSyntaxErrorPlugin()])
+nose.main(addplugins=[HtmlOutput(), Markdown()])


 import traceback
-from util import MdSyntaxError
+from util import MarkdownSyntaxError
 from nose.plugins import Plugin
 from nose.plugins.errorclass import ErrorClass, ErrorClassPlugin
-class MdSyntaxErrorPlugin(ErrorClassPlugin):
-    """ Add MdSyntaxError and ensure proper formatting. """
-    mdsyntax = ErrorClass(MdSyntaxError, label='MdSyntaxError', isfailure=True)
+class Markdown(ErrorClassPlugin):
+    """ Add MarkdownSyntaxError and ensure proper formatting. """
+    mdsyntax = ErrorClass(MarkdownSyntaxError, 
+                          label='MarkdownSyntaxError', 
+                          isfailure=True)
     enabled = True
     def configure(self, options, conf):
     def formatError(self, test, err):
         """ Remove unnessecary and unhelpful traceback from error report. """
         et, ev, tb = err
-        if et.__name__ == 'MdSyntaxError':
+        if et.__name__ == 'MarkdownSyntaxError':
             return et, ev, ''
         return err


 from ConfigParser import SafeConfigParser
-class MdSyntaxError(Exception):
+class MarkdownSyntaxError(Exception):