--- a/Lib/test/test_htmlparser.py +++ b/Lib/test/test_htmlparser.py @@ -379,17 +379,18 @@ text '' '') expected = [('comment', "[if IE & !(lte IE 8)]>aren'tcondcomspretty?a{0}z'.format(charref), expected, collector=collector()) @@ -424,18 +425,16 @@ text class HTMLParserTolerantTestCase(HTMLParserStrictTestCase): def get_collector(self): return EventCollector(convert_charrefs=False) def test_deprecation_warnings(self): with self.assertWarns(DeprecationWarning): - EventCollector() # convert_charrefs not passed explicitly - with self.assertWarns(DeprecationWarning): EventCollector(strict=True) with self.assertWarns(DeprecationWarning): EventCollector(strict=False) with self.assertRaises(html.parser.HTMLParseError): with self.assertWarns(DeprecationWarning): EventCollector().error('test') def test_tolerant_parsing(self): @@ -742,17 +741,16 @@ class AttributesStrictTestCase(TestCaseB [("starttag", "a", [("a.b", "v"), ("c:d", "v"), ("e-f", "v")])]) def test_entityrefs_in_attributes(self): self._run_check( "", [("starttag", "html", [("foo", "\u20AC&aa&unsupported;")])]) - class AttributesTolerantTestCase(AttributesStrictTestCase): def get_collector(self): return EventCollector(convert_charrefs=False) def test_attr_funky_names2(self): self._run_check( "",