mirror of https://github.com/django/django.git
Fixed #5362: markup tests no longer fail under SVN versions of docutils. Thanks, keithb.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
cb350d72ab
commit
953e695246
|
@ -61,8 +61,15 @@ Paragraph 2 with a link_
|
|||
t = Template("{{ rest_content|restructuredtext }}")
|
||||
rendered = t.render(Context(locals())).strip()
|
||||
if docutils:
|
||||
self.assertEqual(rendered, """<p>Paragraph 1</p>
|
||||
# Different versions of docutils return slightly different HTML
|
||||
try:
|
||||
# Docutils v0.4 and earlier
|
||||
self.assertEqual(rendered, """<p>Paragraph 1</p>
|
||||
<p>Paragraph 2 with a <a class="reference" href="http://www.example.com/">link</a></p>""")
|
||||
except AssertionError, e:
|
||||
# Docutils from SVN (which will become 0.5)
|
||||
self.assertEqual(rendered, """<p>Paragraph 1</p>
|
||||
<p>Paragraph 2 with a <a class="reference external" href="http://www.example.com/">link</a></p>""")
|
||||
else:
|
||||
self.assertEqual(rendered, rest_content)
|
||||
|
||||
|
|
Loading…
Reference in New Issue