mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
#21047: set the default value for the *convert_charrefs* argument of HTMLParser to True. Patch by Berker Peksag.
This commit is contained in:
parent
11bec7a1b8
commit
6fc16d81af
4 changed files with 12 additions and 17 deletions
|
@ -346,7 +346,8 @@ text
|
|||
self._run_check(html, expected)
|
||||
|
||||
def test_convert_charrefs(self):
|
||||
collector = lambda: EventCollectorCharrefs(convert_charrefs=True)
|
||||
# default value for convert_charrefs is now True
|
||||
collector = lambda: EventCollectorCharrefs()
|
||||
self.assertTrue(collector().convert_charrefs)
|
||||
charrefs = ['"', '"', '"', '"', '"', '"']
|
||||
# check charrefs in the middle of the text/attributes
|
||||
|
@ -383,10 +384,6 @@ text
|
|||
self._run_check('no charrefs here', [('data', 'no charrefs here')],
|
||||
collector=collector())
|
||||
|
||||
def test_deprecation_warnings(self):
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
EventCollector() # convert_charrefs not passed explicitly
|
||||
|
||||
# the remaining tests were for the "tolerant" parser (which is now
|
||||
# the default), and check various kind of broken markup
|
||||
def test_tolerant_parsing(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue