[Python-checkins] cpython (merge 3.2 -> default): #12008: merge with 3.2.
ezio.melotti
python-checkins at python.org
Tue Nov 1 13:44:06 CET 2011
http://hg.python.org/cpython/rev/495b31a8b280
changeset: 73278:495b31a8b280
parent: 73276:5a2947376d2e
parent: 73277:6107a84e3c44
user: Ezio Melotti <ezio.melotti at gmail.com>
date: Tue Nov 01 14:43:51 2011 +0200
summary:
#12008: merge with 3.2.
files:
Lib/test/test_htmlparser.py | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py
--- a/Lib/test/test_htmlparser.py
+++ b/Lib/test/test_htmlparser.py
@@ -377,6 +377,30 @@
('endtag', 'html')],
collector = self.collector)
+ def test_with_unquoted_attributes(self):
+ html = ("<html><body bgcolor=d0ca90 text='181008'>"
+ "<table cellspacing=0 cellpadding=1 width=100% ><tr>"
+ "<td align=left><font size=-1>"
+ "- <a href=/rabota/><span class=en> software-and-i</span></a>"
+ "- <a href='/1/'><span class=en> library</span></a></table>")
+ expected = [
+ ('starttag', 'html', []),
+ ('starttag', 'body', [('bgcolor', 'd0ca90'), ('text', '181008')]),
+ ('starttag', 'table',
+ [('cellspacing', '0'), ('cellpadding', '1'), ('width', '100%')]),
+ ('starttag', 'tr', []),
+ ('starttag', 'td', [('align', 'left')]),
+ ('starttag', 'font', [('size', '-1')]),
+ ('data', '- '), ('starttag', 'a', [('href', '/rabota/')]),
+ ('starttag', 'span', [('class', 'en')]), ('data', ' software-and-i'),
+ ('endtag', 'span'), ('endtag', 'a'),
+ ('data', '- '), ('starttag', 'a', [('href', '/1/')]),
+ ('starttag', 'span', [('class', 'en')]), ('data', ' library'),
+ ('endtag', 'span'), ('endtag', 'a'), ('endtag', 'table')
+ ]
+
+ self._run_check(html, expected, collector=self.collector)
+
def test_comma_between_attributes(self):
self._run_check('<form action="/xxx.php?a=1&b=2&", '
'method="post">', [
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list