diff test/test_templating.py @ 6109:b108c9fc7aea

fix test for Python 2
author Christof Meerwald <cmeerw@cmeerw.org>
date Fri, 28 Feb 2020 08:15:51 +0000
parents a1fd9551d416
children 474de62f4ce0
line wrap: on
line diff
--- a/test/test_templating.py	Thu Feb 27 22:00:24 2020 -0500
+++ b/test/test_templating.py	Fri Feb 28 08:15:51 2020 +0000
@@ -429,11 +429,10 @@
         self.assertEqual(p.markdown().strip(), u2s(u'<p>A link <a href="http://localhost">http://localhost</a></p>'))
 
     def test_string_markdown_link(self):
-        # markdown2 and markdown 
+        # markdown2 and markdown escape the email address
         try:
-            import html
-            html_unescape = html.unescape
-        except AttributeError:
+            from html import unescape as html_unescape
+        except ImportError:
             from HTMLParser import HTMLParser
             html_unescape = HTMLParser().unescape
 

Roundup Issue Tracker: http://roundup-tracker.org/