diff --git a/tests/test_readers.py b/tests/test_readers.py index d4f0aecf..c0b8cc41 100644 --- a/tests/test_readers.py +++ b/tests/test_readers.py @@ -26,7 +26,8 @@ class RstReaderTest(unittest.TestCase): 'category': 'yeah', 'author': u'Alexis Métaireau', 'title': 'This is a super article !', - 'summary': 'Multi-line metadata should be supported\nas well as inline markup.', + 'summary': 'Multi-line metadata should be supported\nas well as'\ + ' inline markup.', 'date': datetime.datetime(2010, 12, 2, 10, 14), 'tags': ['foo', 'bar', 'foobar'], } @@ -43,10 +44,13 @@ class RstReaderTest(unittest.TestCase): self.assertEqual(content, expected) - # otherwise, typogrify should be applied - content, _ = readers.read_file(_filename('article.rst'), - settings={'TYPOGRIFY': True}) - expected = "

This is some content. With some stuff to "\ - "“typogrify”.

\n" + try: + # otherwise, typogrify should be applied + content, _ = readers.read_file(_filename('article.rst'), + settings={'TYPOGRIFY': True}) + expected = "

This is some content. With some stuff to "\ + "“typogrify”.

\n" - self.assertEqual(content, expected) + self.assertEqual(content, expected) + except ImportError: + return unittest.skip('need the typogrify distribution')