diff options
author | Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de> | 2010-05-02 22:46:54 +0200 |
---|---|---|
committer | Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de> | 2010-05-02 22:46:54 +0200 |
commit | f17c61c16afd4fd00634424511127c1086b39ef0 (patch) | |
tree | 91c89c14ddbbdaa1ec2c16965dfcf950443d18c6 | |
parent | b53fad8a9e4e807564d11db3ed5a75187e3e1f6c (diff) | |
download | external_python_setuptools-f17c61c16afd4fd00634424511127c1086b39ef0.tar.gz external_python_setuptools-f17c61c16afd4fd00634424511127c1086b39ef0.tar.bz2 external_python_setuptools-f17c61c16afd4fd00634424511127c1086b39ef0.zip |
add a partial test for user install umplication if installed in user-site
--HG--
branch : distribute
extra : rebase_source : 395e549d507def44d1b7a4454076bb84a47cc1eb
-rw-r--r-- | setuptools/tests/test_easy_install.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/setuptools/tests/test_easy_install.py b/setuptools/tests/test_easy_install.py index f2655d75..af2e9462 100644 --- a/setuptools/tests/test_easy_install.py +++ b/setuptools/tests/test_easy_install.py @@ -148,10 +148,12 @@ class TestUserInstallTest(unittest.TestCase): self.old_cwd = os.getcwd() os.chdir(self.dir) if sys.version >= "2.6": + self.old_file = easy_install_pkg.__file__ self.old_base = site.USER_BASE site.USER_BASE = tempfile.mkdtemp() self.old_site = site.USER_SITE site.USER_SITE = tempfile.mkdtemp() + easy_install_pkg.__file__ = site.USER_SITE def tearDown(self): os.chdir(self.old_cwd) @@ -161,19 +163,21 @@ class TestUserInstallTest(unittest.TestCase): shutil.rmtree(site.USER_SITE) site.USER_BASE = self.old_base site.USER_SITE = self.old_site + easy_install_pkg.__file__ = self.old_file def test_install(self): #XXX: replace with something meaningfull - return if sys.version < "2.6": - return + return #SKIP dist = Distribution() dist.script_name = 'setup.py' cmd = easy_install(dist) - cmd.user = 1 cmd.args = ['py'] cmd.ensure_finalized() - cmd.user = 1 + self.assertTrue(cmd.user, 'user should be implied') + + return + # this part is disabled it currently fails old_stdout = sys.stdout sys.stdout = StringIO() try: |