Commits

Anonymous committed 9a66249

backported the #44 issue test

Comments (0)

Files changed (1)

distribute.installer/distribute/installer/tests/test_easy_install.py

+"""Easy install Tests
+"""
+import os, shutil, tempfile, unittest
+from distribute.installer.command.easy_install import easy_install
+from distribute.core.dist import Distribution
+
+class TestEasyInstallTest(unittest.TestCase):
+
+    def test_install_site_py(self):
+        dist = Distribution()
+        cmd = easy_install(dist)
+        cmd.sitepy_installed = False
+        cmd.install_dir = tempfile.mkdtemp()
+        try:
+            cmd.install_site_py()
+            sitepy = os.path.join(cmd.install_dir, 'site.py')
+            self.assert_(os.path.exists(sitepy))
+        finally:
+            shutil.rmtree(cmd.install_dir)
+