Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #2397 -- fixed markdown test to be a bit more lenient in what c…

…ounts as a

pass due to whitespace differences between markdown versions. Thanks to
shields@msrl.com for the patch.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3420 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit dd19218f4e89d5525f9834348bc6f94410c60862 1 parent 1687b02
Malcolm Tredinnick authored July 22, 2006

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  tests/othertests/markup.py
4  tests/othertests/markup.py
... ...
@@ -1,6 +1,7 @@
1 1
 # Quick tests for the markup templatetags (django.contrib.markup)
2 2
 
3 3
 from django.template import Template, Context, add_to_builtins
  4
+import re
4 5
 
5 6
 add_to_builtins('django.contrib.markup.templatetags.markup')
6 7
 
@@ -47,7 +48,8 @@
47 48
 t = Template("{{ markdown_content|markdown }}")
48 49
 rendered = t.render(Context(locals())).strip()
49 50
 if markdown:
50  
-    assert rendered == """<p>Paragraph 1</p><h2>An h2</h2>"""
  51
+    pattern = re.compile("""<p>Paragraph 1\s*</p>\s*<h2>\s*An h2</h2>""")
  52
+    assert pattern.match(rendered)
51 53
 else:
52 54
     assert rendered == markdown_content
53 55
 

0 notes on commit dd19218

Please sign in to comment.
Something went wrong with that request. Please try again.