[Python-checkins] r63465 - in python/trunk/Lib/test: test_htmlparser.py test_tcl.py
benjamin.peterson
python-checkins at python.org
Mon May 19 01:07:07 CEST 2008
Author: benjamin.peterson
Date: Mon May 19 01:07:07 2008
New Revision: 63465
Log:
change some imports in tests so they will not be skipped in 3.0
Modified:
python/trunk/Lib/test/test_htmlparser.py
python/trunk/Lib/test/test_tcl.py
Modified: python/trunk/Lib/test/test_htmlparser.py
==============================================================================
--- python/trunk/Lib/test/test_htmlparser.py (original)
+++ python/trunk/Lib/test/test_htmlparser.py Mon May 19 01:07:07 2008
@@ -1,17 +1,17 @@
"""Tests for HTMLParser.py."""
-import HTMLParser
+import html.parser
import pprint
import unittest
from test import test_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 @@
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):
Modified: python/trunk/Lib/test/test_tcl.py
==============================================================================
--- python/trunk/Lib/test/test_tcl.py (original)
+++ python/trunk/Lib/test/test_tcl.py Mon May 19 01:07:07 2008
@@ -3,7 +3,7 @@
import unittest
import os
from test import test_support
-from Tkinter import Tcl
+from tkinter import Tcl
from _tkinter import TclError
class TclTest(unittest.TestCase):
More information about the Python-checkins
mailing list