diff Lib/test/test_htmlparser.py @ 87334:0534b882f9ce

#19688: add back and deprecate the internal HTMLParser.unescape() method.
author Ezio Melotti <ezio.melotti@gmail.com>
date Fri, 22 Nov 2013 05:49:29 +0200
parents 7b9235852b3b
children 1575f2dd08c4
line wrap: on
line diff
--- a/Lib/test/test_htmlparser.py	Fri Nov 22 03:43:48 2013 +0100
+++ b/Lib/test/test_htmlparser.py	Fri Nov 22 05:49:29 2013 +0200
@@ -569,6 +569,13 @@
         for html, expected in data:
             self._run_check(html, expected)
 
+    def test_unescape_method(self):
+        from html import unescape
+        p = self.get_collector()
+        with self.assertWarns(DeprecationWarning):
+            s = '&quot;&#34;&#x22;&quot&#34&#x22&#bad;'
+            self.assertEqual(p.unescape(s), unescape(s))
+
     def test_broken_comments(self):
         html = ('<! not really a comment >'
                 '<! not a comment either -->'