mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
skip typogrify if not installed
This commit is contained in:
parent
32355f5463
commit
48b318d29e
1 changed files with 11 additions and 7 deletions
|
|
@ -26,7 +26,8 @@ class RstReaderTest(unittest.TestCase):
|
||||||
'category': 'yeah',
|
'category': 'yeah',
|
||||||
'author': u'Alexis Métaireau',
|
'author': u'Alexis Métaireau',
|
||||||
'title': 'This is a super article !',
|
'title': 'This is a super article !',
|
||||||
'summary': 'Multi-line metadata should be supported\nas well as <strong>inline markup</strong>.',
|
'summary': 'Multi-line metadata should be supported\nas well as'\
|
||||||
|
' <strong>inline markup</strong>.',
|
||||||
'date': datetime.datetime(2010, 12, 2, 10, 14),
|
'date': datetime.datetime(2010, 12, 2, 10, 14),
|
||||||
'tags': ['foo', 'bar', 'foobar'],
|
'tags': ['foo', 'bar', 'foobar'],
|
||||||
}
|
}
|
||||||
|
|
@ -43,10 +44,13 @@ class RstReaderTest(unittest.TestCase):
|
||||||
|
|
||||||
self.assertEqual(content, expected)
|
self.assertEqual(content, expected)
|
||||||
|
|
||||||
# otherwise, typogrify should be applied
|
try:
|
||||||
content, _ = readers.read_file(_filename('article.rst'),
|
# otherwise, typogrify should be applied
|
||||||
settings={'TYPOGRIFY': True})
|
content, _ = readers.read_file(_filename('article.rst'),
|
||||||
expected = "<p>This is some content. With some stuff to "\
|
settings={'TYPOGRIFY': True})
|
||||||
"“typogrify”.</p>\n"
|
expected = "<p>This is some content. With some stuff to "\
|
||||||
|
"“typogrify”.</p>\n"
|
||||||
|
|
||||||
self.assertEqual(content, expected)
|
self.assertEqual(content, expected)
|
||||||
|
except ImportError:
|
||||||
|
return unittest.skip('need the typogrify distribution')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue