From 953e69524646e6a27dfecea72b51e069a0ecb68b Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Sun, 2 Dec 2007 21:01:17 +0000 Subject: [PATCH] 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 --- django/contrib/markup/tests.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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, """

Paragraph 1

+ # Different versions of docutils return slightly different HTML + try: + # Docutils v0.4 and earlier + self.assertEqual(rendered, """

Paragraph 1

Paragraph 2 with a link

""") + except AssertionError, e: + # Docutils from SVN (which will become 0.5) + self.assertEqual(rendered, """

Paragraph 1

+

Paragraph 2 with a link

""") else: self.assertEqual(rendered, rest_content)