diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-11-22 03:49:29 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-11-22 03:49:29 (GMT) |
commit | f6de9eb2bb3c3c16694d582e3e1e2e9f56b97aab (patch) | |
tree | 1ac8e32faba127a5b7accab4fd72109a787f7867 /Lib/test/test_htmlparser.py | |
parent | 32f0c7a67b6b2eb3808b47b462e837582d6710f8 (diff) | |
download | cpython-f6de9eb2bb3c3c16694d582e3e1e2e9f56b97aab.zip cpython-f6de9eb2bb3c3c16694d582e3e1e2e9f56b97aab.tar.gz cpython-f6de9eb2bb3c3c16694d582e3e1e2e9f56b97aab.tar.bz2 |
#19688: add back and deprecate the internal HTMLParser.unescape() method.
Diffstat (limited to 'Lib/test/test_htmlparser.py')
-rw-r--r-- | Lib/test/test_htmlparser.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py index a943d3a..509b3cd 100644 --- a/Lib/test/test_htmlparser.py +++ b/Lib/test/test_htmlparser.py @@ -569,6 +569,13 @@ class HTMLParserTolerantTestCase(HTMLParserStrictTestCase): 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 = '""""""&#bad;' + self.assertEqual(p.unescape(s), unescape(s)) + def test_broken_comments(self): html = ('<! not really a comment >' '<! not a comment either -->' |