Remove unused imports in test modules.
diff --git a/Lib/test/test_commands.py b/Lib/test/test_commands.py
index 27b6c3d..4e482d2 100644
--- a/Lib/test/test_commands.py
+++ b/Lib/test/test_commands.py
@@ -12,8 +12,7 @@
from test.test_support import run_unittest, reap_children, import_module
# Silence Py3k warning
-import_module('commands', deprecated=True)
-from commands import *
+commands = import_module('commands', deprecated=True)
# The module says:
# "NB This only works (and is only relevant) for UNIX."
@@ -28,8 +27,8 @@
class CommandTests(unittest.TestCase):
def test_getoutput(self):
- self.assertEquals(getoutput('echo xyzzy'), 'xyzzy')
- self.assertEquals(getstatusoutput('echo xyzzy'), (0, 'xyzzy'))
+ self.assertEquals(commands.getoutput('echo xyzzy'), 'xyzzy')
+ self.assertEquals(commands.getstatusoutput('echo xyzzy'), (0, 'xyzzy'))
# we use mkdtemp in the next line to create an empty directory
# under our exclusive control; from that, we can invent a pathname
@@ -39,7 +38,7 @@
dir = tempfile.mkdtemp()
name = os.path.join(dir, "foo")
- status, output = getstatusoutput('cat ' + name)
+ status, output = commands.getstatusoutput('cat ' + name)
self.assertNotEquals(status, 0)
finally:
if dir is not None:
@@ -60,7 +59,7 @@
/\. # and end with the name of the file.
'''
- self.assertTrue(re.match(pat, getstatus("/."), re.VERBOSE))
+ self.assertTrue(re.match(pat, commands.getstatus("/."), re.VERBOSE))
def test_main():