diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2008-05-21 13:51:18 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2008-05-21 13:51:18 (GMT) |
commit | f64dcf3ce0fee21146ac83f9f39b6653a5db84aa (patch) | |
tree | c9656944c24bb0434c1656c7707e0dd9afc90da8 /Lib/test/test_htmlparser.py | |
parent | 96ad65da2fa49e3ebc1da26177f2322be8f7b24f (diff) | |
download | cpython-f64dcf3ce0fee21146ac83f9f39b6653a5db84aa.zip cpython-f64dcf3ce0fee21146ac83f9f39b6653a5db84aa.tar.gz cpython-f64dcf3ce0fee21146ac83f9f39b6653a5db84aa.tar.bz2 |
Change test_htmlparser to reflect the HTMLParser -> html.parser
rename in r63439.
Also fix one occurrence of unichr() in html.parser.
Diffstat (limited to 'Lib/test/test_htmlparser.py')
-rwxr-xr-x | Lib/test/test_htmlparser.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py index 8691cbf..dd74aac 100755 --- a/Lib/test/test_htmlparser.py +++ b/Lib/test/test_htmlparser.py @@ -1,17 +1,17 @@ """Tests for HTMLParser.py.""" -import HTMLParser +import html.parser import pprint import unittest from test import support -class EventCollector(HTMLParser.HTMLParser): +class EventCollector(html.parser.HTMLParser): def __init__(self): self.events = [] self.append = self.events.append - HTMLParser.HTMLParser.__init__(self) + html.parser.HTMLParser.__init__(self) def get_events(self): # Normalize the list of events so that buffer artefacts don't @@ -88,10 +88,10 @@ class TestCaseBase(unittest.TestCase): def _parse_error(self, source): def parse(source=source): - parser = HTMLParser.HTMLParser() + parser = html.parser.HTMLParser() parser.feed(source) parser.close() - self.assertRaises(HTMLParser.HTMLParseError, parse) + self.assertRaises(html.parser.HTMLParseError, parse) class HTMLParserTestCase(TestCaseBase): |