summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_htmlparser.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-09-04 16:26:03 (GMT)
committerFred Drake <fdrake@acm.org>2001-09-04 16:26:03 (GMT)
commit7cf613dc77302fb9a2a6533878aba7296276e12c (patch)
tree4b0a537f66e0e65a3750bac2156545895b924050 /Lib/test/test_htmlparser.py
parenta0ca3d611e0abc503da85d999069803fe8bed7a1 (diff)
downloadcpython-7cf613dc77302fb9a2a6533878aba7296276e12c.zip
cpython-7cf613dc77302fb9a2a6533878aba7296276e12c.tar.gz
cpython-7cf613dc77302fb9a2a6533878aba7296276e12c.tar.bz2
HTMLParser is allowed to be more strict than sgmllib, so let's not
change their basic behavior: When parsing something that cannot possibly be valid in either HTML or XHTML, raise an exception.
Diffstat (limited to 'Lib/test/test_htmlparser.py')
-rwxr-xr-xLib/test/test_htmlparser.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py
index 4e8e73c..8661066 100755
--- a/Lib/test/test_htmlparser.py
+++ b/Lib/test/test_htmlparser.py
@@ -203,12 +203,7 @@ DOCTYPE html [
])
def test_illegal_declarations(self):
- s = 'abc<!spacer type="block" height="25">def'
- self._run_check(s, [
- ("data", "abc"),
- ("unknown decl", 'spacer type="block" height="25"'),
- ("data", "def"),
- ])
+ self._parse_error('<!spacer type="block" height="25">')
def test_starttag_end_boundary(self):
self._run_check("""<a b='<'>""", [("starttag", "a", [("b", "<")])])