summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2007-12-02 21:01:17 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2007-12-02 21:01:17 +0000
commit953e69524646e6a27dfecea72b51e069a0ecb68b (patch)
treedb0fed4167fc5e328278ed2bd7b395dc4de7a90a
parentcb350d72abdaf02a4816ba65be1c5827bf14916e (diff)
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
-rw-r--r--django/contrib/markup/tests.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/django/contrib/markup/tests.py b/django/contrib/markup/tests.py
index 6e7beaeb2f..9a96f8cda4 100644
--- a/django/contrib/markup/tests.py
+++ b/django/contrib/markup/tests.py
@@ -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)