mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
#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:
parent
a4db02c7a3
commit
3861d8b271
4 changed files with 35 additions and 18 deletions
|
@ -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 = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue