#15114: the strict mode of HTMLParser and the HTMLParseError exception are deprecated now that the parser is able to parse invalid markup.

This commit is contained in:
Ezio Melotti 2012-06-23 15:27:51 +02:00
parent a4db02c7a3
commit 3861d8b271
4 changed files with 35 additions and 18 deletions

View file

@ -102,7 +102,8 @@ class TestCaseBase(unittest.TestCase):
class HTMLParserStrictTestCase(TestCaseBase):
def get_collector(self):
return EventCollector(strict=True)
with support.check_warnings(("", DeprecationWarning), quite=False):
return EventCollector(strict=True)
def test_processing_instruction_only(self):
self._run_check("<?processing instruction>", [
@ -594,7 +595,8 @@ class HTMLParserTolerantTestCase(HTMLParserStrictTestCase):
class AttributesStrictTestCase(TestCaseBase):
def get_collector(self):
return EventCollector(strict=True)
with support.check_warnings(("", DeprecationWarning), quite=False):
return EventCollector(strict=True)
def test_attr_syntax(self):
output = [