mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
#19688: add back and deprecate the internal HTMLParser.unescape() method.
This commit is contained in:
parent
32f0c7a67b
commit
f6de9eb2bb
2 changed files with 14 additions and 0 deletions
|
@ -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 -->'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue