summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-05-18 23:07:07 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-05-18 23:07:07 (GMT)
commitd21dabc890087fb030ad2f732de9386f0cc03f9c (patch)
treee3859363719184a7b27b59c20bba06f13ba215b4 /Lib/test
parent913c15c1c6641195b492837eee1189369abe04b7 (diff)
downloadcpython-d21dabc890087fb030ad2f732de9386f0cc03f9c.zip
cpython-d21dabc890087fb030ad2f732de9386f0cc03f9c.tar.gz
cpython-d21dabc890087fb030ad2f732de9386f0cc03f9c.tar.bz2
change some imports in tests so they will not be skipped in 3.0
Diffstat (limited to 'Lib/test')
-rwxr-xr-xLib/test/test_htmlparser.py10
-rw-r--r--Lib/test/test_tcl.py2
2 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_htmlparser.py b/Lib/test/test_htmlparser.py
index 810af6c..4757b22 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 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 @@ 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):
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index fa170ef..6b41a17 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -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):