summaryrefslogtreecommitdiff
path: root/Lib/test/test_htmlparser.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-06-23 15:27:51 +0200
committerEzio Melotti <ezio.melotti@gmail.com>2012-06-23 15:27:51 +0200
commit3861d8b27127a261391ee49ff8634a4ef3ba1dd3 (patch)
treec76b34f4269c742f50be485890703200262def43 /Lib/test/test_htmlparser.py
parenta4db02c7a38c5669b5678f1e972d8b9c6d3a2238 (diff)
downloadcpython-git-3861d8b27127a261391ee49ff8634a4ef3ba1dd3.tar.gz
#15114: the strict mode of HTMLParser and the HTMLParseError exception are deprecated now that the parser is able to parse invalid markup.
Diffstat (limited to 'Lib/test/test_htmlparser.py')
-rw-r--r--Lib/test/test_htmlparser.py6
1 files changed, 4 insertions, 2 deletions
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("<?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 = [