Kaydet (Commit) 953e6952 authored tarafından Jacob Kaplan-Moss's avatar Jacob Kaplan-Moss

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
üst cb350d72
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment