summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_htmlparser.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-06-24 20:02:56 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2012-06-24 20:02:56 (GMT)
commit46495182d0fc58b519d10315f1bf392f08f33a2e (patch)
tree0503e0a7032d33e98954331d3a2d5c6e19607392 /Lib/test/test_htmlparser.py
parenta504a7a7d1fd6056e067027354d31595aa4b8958 (diff)
downloadcpython-46495182d0fc58b519d10315f1bf392f08f33a2e.zip
cpython-46495182d0fc58b519d10315f1bf392f08f33a2e.tar.gz
cpython-46495182d0fc58b519d10315f1bf392f08f33a2e.tar.bz2
#15156: HTMLParser now uses the new "html.entities.html5" dictionary.
Diffstat (limited to 'Lib/test/test_htmlparser.py')
-rw-r--r--Lib/test/test_htmlparser.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py
index 64a4f5d..c5d878d 100644
--- a/Lib/test/test_htmlparser.py
+++ b/Lib/test/test_htmlparser.py
@@ -456,7 +456,7 @@ class HTMLParserTolerantTestCase(HTMLParserStrictTestCase):
self._run_check('<form action="/xxx.php?a=1&amp;b=2&amp", '
'method="post">', [
('starttag', 'form',
- [('action', '/xxx.php?a=1&b=2&amp'),
+ [('action', '/xxx.php?a=1&b=2&'),
(',', None), ('method', 'post')])])
def test_weird_chars_in_unquoted_attribute_values(self):
@@ -541,6 +541,11 @@ class HTMLParserTolerantTestCase(HTMLParserStrictTestCase):
self.assertEqual(p.unescape('&#0038;'),'&')
# see #12888
self.assertEqual(p.unescape('&#123; ' * 1050), '{ ' * 1050)
+ # see #15156
+ self.assertEqual(p.unescape('&Eacuteric&Eacute;ric'
+ '&alphacentauri&alpha;centauri'),
+ 'ÉricÉric&alphacentauriαcentauri')
+ self.assertEqual(p.unescape('&co;'), '&co;')
def test_broken_comments(self):
html = ('<! not really a comment >'