1
0
Fork 0
forked from github/pelican

Fix tests with latest versions of smartypants.

smartypants is now py3 compatible but the default settings for double quotes has
been changed (http://pythonhosted.org/smartypants/changes.html).

This commit:
- update the typogrify test (change quotes, and add more test casesi: caps word,
  ellipsis)
- install typogrify on travis
- uses upstream version of smartypants in tox instead of dmdm's fork for py3
This commit is contained in:
Simon Conseil 2013-09-26 00:37:35 +02:00
commit a49b744e95
4 changed files with 10 additions and 8 deletions

View file

@ -104,8 +104,8 @@ class RstReaderTest(ReaderTest):
# if nothing is specified in the settings, the content should be
# unmodified
page = self.read_file(path='article.rst')
expected = ('<p>This is some content. With some stuff to '
'&quot;typogrify&quot;.</p>\n<p>Now with added '
expected = ('<p>THIS is some content. With some stuff to '
'&quot;typogrify&quot;...</p>\n<p>Now with added '
'support for <abbr title="three letter acronym">'
'TLA</abbr>.</p>\n')
@ -114,10 +114,11 @@ class RstReaderTest(ReaderTest):
try:
# otherwise, typogrify should be applied
page = self.read_file(path='article.rst', TYPOGRIFY=True)
expected = ('<p>This is some content. With some stuff to&nbsp;'
'&#8220;typogrify&#8221;.</p>\n<p>Now with added '
'support for <abbr title="three letter acronym">'
'<span class="caps">TLA</span></abbr>.</p>\n')
expected = (
'<p><span class="caps">THIS</span> is some content. '
'With some stuff to&nbsp;&quot;typogrify&quot;&#8230;</p>\n'
'<p>Now with added support for <abbr title="three letter '
'acronym"><span class="caps">TLA</span></abbr>.</p>\n')
self.assertEqual(page.content, expected)
except ImportError: