Commits

Ronny Pfannschmidt committed d5a9297

add a partial test for user install umplication if installed in user-site

  • Participants
  • Parent commits 052133e
  • Branches 0.6-maintenance

Comments (0)

Files changed (1)

setuptools/tests/test_easy_install.py

         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)
             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: