aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--markdown/tests/__init__.py10
-rw-r--r--markdown/tests/plugins.py12
-rw-r--r--markdown/tests/util.py2
3 files changed, 13 insertions, 11 deletions
diff --git a/markdown/tests/__init__.py b/markdown/tests/__init__.py
index 63ddf5b..5834e17 100644
--- a/markdown/tests/__init__.py
+++ b/markdown/tests/__init__.py
@@ -4,7 +4,7 @@ import codecs
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__))
@@ -25,10 +25,10 @@ def check_syntax(file, config):
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': '',
@@ -41,4 +41,4 @@ def test_markdown_syntax():
if ext == '.txt':
yield check_syntax, os.path.join(dir_name, root), config
-nose.main(addplugins=[HtmlOutput(), MdSyntaxErrorPlugin()])
+nose.main(addplugins=[HtmlOutput(), Markdown()])
diff --git a/markdown/tests/plugins.py b/markdown/tests/plugins.py
index d0cb7f8..ce06c3f 100644
--- a/markdown/tests/plugins.py
+++ b/markdown/tests/plugins.py
@@ -1,11 +1,13 @@
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):
@@ -18,7 +20,7 @@ class MdSyntaxErrorPlugin(ErrorClassPlugin):
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
diff --git a/markdown/tests/util.py b/markdown/tests/util.py
index 3b0175d..aae87be 100644
--- a/markdown/tests/util.py
+++ b/markdown/tests/util.py
@@ -1,6 +1,6 @@
from ConfigParser import SafeConfigParser
-class MdSyntaxError(Exception):
+class MarkdownSyntaxError(Exception):
pass