From 7cf613dc77302fb9a2a6533878aba7296276e12c Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 4 Sep 2001 16:26:03 +0000 Subject: 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. --- Lib/test/test_htmlparser.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'Lib/test/test_htmlparser.py') diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py index 4e8e73c168..86610662e3 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 = 'abcdef' - self._run_check(s, [ - ("data", "abc"), - ("unknown decl", 'spacer type="block" height="25"'), - ("data", "def"), - ]) + self._parse_error('') def test_starttag_end_boundary(self): self._run_check("""""", [("starttag", "a", [("b", "<")])]) -- cgit v1.2.1