From 3861d8b27127a261391ee49ff8634a4ef3ba1dd3 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sat, 23 Jun 2012 15:27:51 +0200 Subject: #15114: the strict mode of HTMLParser and the HTMLParseError exception are deprecated now that the parser is able to parse invalid markup. --- Lib/test/test_htmlparser.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Lib/test/test_htmlparser.py') diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py index c4f80cca30..64a4f5dfb4 100644 --- a/Lib/test/test_htmlparser.py +++ b/Lib/test/test_htmlparser.py @@ -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("", [ @@ -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 = [ -- cgit v1.2.1