don't test the markdown reader if markdown isn't installed

This commit is contained in:
Alexis Metaireau 2012-06-10 12:39:51 +02:00
commit 298c15bdda
2 changed files with 4 additions and 0 deletions

View file

@ -6,3 +6,4 @@ unittest2
pytz
mock
Markdown
blinker

View file

@ -62,8 +62,10 @@ class RstReaderTest(unittest.TestCase):
except ImportError:
return unittest.skip('need the typogrify distribution')
class MdReaderTest(unittest.TestCase):
@unittest.skipUnless(readers.Markdown, "markdown isn't installed")
def test_article_with_md_extention(self):
# test to ensure the md extension is being processed by the correct reader
reader = readers.MarkdownReader({})
@ -74,6 +76,7 @@ class MdReaderTest(unittest.TestCase):
self.assertEqual(content, expected)
@unittest.skipUnless(readers.Markdown, "markdown isn't installed")
def test_article_with_mkd_extension(self):
# test to ensure the mkd extension is being processed by the correct reader
reader = readers.MarkdownReader({})