MCPcopy Index your code
hub / github.com/python/cpython / test_simple_html

Method test_simple_html

Lib/test/test_htmlparser.py:145–175  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

143 ])
144
145 def test_simple_html(self):
146 self._run_check("""
147<!DOCTYPE html PUBLIC 'foo'>
148<HTML>&entity;&#32;
149<!--comment1a
150-></foo><bar>&lt;<?pi?></foo<bar
151comment1b-->
152<Img sRc='Bar' isMAP>sample
153text
154&#x201C;
155<!--comment2a-- --comment2b-->
156</Html>
157""", [
158 ("data", "\n"),
159 ("decl", "DOCTYPE html PUBLIC 'foo'"),
160 ("data", "\n"),
161 ("starttag", "html", []),
162 ("entityref", "entity"),
163 ("charref", "32"),
164 ("data", "\n"),
165 ("comment", "comment1a\n-></foo><bar>&lt;<?pi?></foo<bar\ncomment1b"),
166 ("data", "\n"),
167 ("starttag", "img", [("src", "Bar"), ("ismap", None)]),
168 ("data", "sample\ntext\n"),
169 ("charref", "x201C"),
170 ("data", "\n"),
171 ("comment", "comment2a-- --comment2b"),
172 ("data", "\n"),
173 ("endtag", "html"),
174 ("data", "\n"),
175 ])
176
177 def test_malformatted_charref(self):
178 self._run_check("<p>&#bad;</p>", [

Callers

nothing calls this directly

Calls 1

_run_checkMethod · 0.80

Tested by

no test coverage detected