aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2012-04-01 09:26:13 -0400
committerJason R. Coombs <jaraco@jaraco.com>2012-04-01 09:26:13 -0400
commit83a86217e2f1cf1259d4b1921b840a449f0dd32b (patch)
tree8ff70461b11c762486c5dab3f25497408883e0a1 /setuptools
parent61942ccf83167298cbd933f1594d59a32f5cf349 (diff)
downloadexternal_python_setuptools-83a86217e2f1cf1259d4b1921b840a449f0dd32b.tar.gz
external_python_setuptools-83a86217e2f1cf1259d4b1921b840a449f0dd32b.tar.bz2
external_python_setuptools-83a86217e2f1cf1259d4b1921b840a449f0dd32b.zip
Reorganized imports and cleaned up whitespace
--HG-- branch : distribute extra : rebase_source : 288c7531df0ab929030445973ecf6386a3e437b1
Diffstat (limited to 'setuptools')
-rw-r--r--setuptools/tests/test_easy_install.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py
index 4150ad10..dce5501d 100644
--- a/setuptools/tests/test_easy_install.py
+++ b/setuptools/tests/test_easy_install.py
@@ -1,9 +1,12 @@
"""Easy install Tests
"""
import sys
-import os, shutil, tempfile, unittest
+import os
+import shutil
+import tempfile
+import unittest
import site
-from StringIO import StringIO
+
from setuptools.command.easy_install import easy_install, get_script_args, main
from setuptools.command.easy_install import PthDistributions
from setuptools.command import easy_install as easy_install_pkg
@@ -11,7 +14,8 @@ from setuptools.dist import Distribution
from pkg_resources import Distribution as PRDistribution
try:
- import multiprocessing
+ # import multiprocessing solely for the purpose of testing its existence
+ __import__('multiprocessing')
import logging
_LOG = logging.getLogger('test_easy_install')
logging.basicConfig(level=logging.INFO, stream=sys.stderr)
@@ -110,7 +114,7 @@ class TestEasyInstallTest(unittest.TestCase):
# the project level
dist = Distribution()
cmd = easy_install(dist)
- cmd.check_pth_processing = lambda : True
+ cmd.check_pth_processing = lambda: True
cmd.no_find_links = True
cmd.find_links = ['link1', 'link2']
cmd.install_dir = os.path.join(tempfile.mkdtemp(), 'ok')
@@ -120,7 +124,7 @@ class TestEasyInstallTest(unittest.TestCase):
# let's try without it (default behavior)
cmd = easy_install(dist)
- cmd.check_pth_processing = lambda : True
+ cmd.check_pth_processing = lambda: True
cmd.find_links = ['link1', 'link2']
cmd.install_dir = os.path.join(tempfile.mkdtemp(), 'ok')
cmd.args = ['ok']
@@ -173,7 +177,7 @@ class TestUserInstallTest(unittest.TestCase):
def tearDown(self):
os.chdir(self.old_cwd)
shutil.rmtree(self.dir)
- if sys.version >= "2.6":
+ if sys.version >= "2.6":
shutil.rmtree(site.USER_BASE)
shutil.rmtree(site.USER_SITE)
site.USER_BASE = self.old_base
@@ -249,4 +253,3 @@ class TestUserInstallTest(unittest.TestCase):
os.environ['PYTHONPATH'] = old_ppath
else:
del os.environ['PYTHONPATH']
-