diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2014-08-02 15:36:12 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2014-08-02 15:36:12 (GMT) |
commit | 6fc16d81af0ec11e79a17e2af12e8653382cef26 (patch) | |
tree | 46c2ed00a7cb5efb78bafd818c3e2b9e04a66c01 /Lib/test/test_htmlparser.py | |
parent | 11bec7a1b83d0edffbcff29dccbabd660f5a9a7b (diff) | |
download | cpython-6fc16d81af0ec11e79a17e2af12e8653382cef26.zip cpython-6fc16d81af0ec11e79a17e2af12e8653382cef26.tar.gz cpython-6fc16d81af0ec11e79a17e2af12e8653382cef26.tar.bz2 |
#21047: set the default value for the *convert_charrefs* argument of HTMLParser to True. Patch by Berker Peksag.
Diffstat (limited to 'Lib/test/test_htmlparser.py')
-rw-r--r-- | Lib/test/test_htmlparser.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py index 1aa150803..de8f3e8 100644 --- a/Lib/test/test_htmlparser.py +++ b/Lib/test/test_htmlparser.py @@ -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): |