Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #5362: markup tests no longer fail under SVN versions of docuti…

…ls. Thanks, keithb.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 953e69524646e6a27dfecea72b51e069a0ecb68b 1 parent cb350d7
@jacobian jacobian authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 django/contrib/markup/tests.py
View
9 django/contrib/markup/tests.py
@@ -61,8 +61,15 @@ def test_docutils(self):
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)
Please sign in to comment.
Something went wrong with that request. Please try again.