summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-06-23 13:27:51 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2012-06-23 13:27:51 (GMT)
commit3861d8b27127a261391ee49ff8634a4ef3ba1dd3 (patch)
treec76b34f4269c742f50be485890703200262def43 /Lib/test
parenta4db02c7a38c5669b5678f1e972d8b9c6d3a2238 (diff)
downloadcpython-3861d8b27127a261391ee49ff8634a4ef3ba1dd3.zip
cpython-3861d8b27127a261391ee49ff8634a4ef3ba1dd3.tar.gz
cpython-3861d8b27127a261391ee49ff8634a4ef3ba1dd3.tar.bz2
#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')
-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 c4f80cc..64a4f5d 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 = [