Skip to content

Commit c847239

Browse files
committed
fix test for Python 2
1 parent 747da33 commit c847239

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/test_templating.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,11 +429,10 @@ def test_string_markdown_link(self):
429429
self.assertEqual(p.markdown().strip(), u2s(u'<p>A link <a href="http://localhost">http://localhost</a></p>'))
430430

431431
def test_string_markdown_link(self):
432-
# markdown2 and markdown
432+
# markdown2 and markdown escape the email address
433433
try:
434-
import html
435-
html_unescape = html.unescape
436-
except AttributeError:
434+
from html import unescape as html_unescape
435+
except ImportError:
437436
from HTMLParser import HTMLParser
438437
html_unescape = HTMLParser().unescape
439438

0 commit comments

Comments
 (0)