예제 #1
0
 def test_projectsEnvironment(self):
     """
     Verify that BranchManager draws from the environment for the projects
     path.
     """
     self.changeEnvironment("COMBINATOR_PROJECTS", "somedir")
     b = BranchManager()
     self.assertEqual(b.svnProjectsDir, os.path.abspath("somedir"))
예제 #2
0
 def test_creation(self):
     """
     Verify that a newly-created branch manager can locate the paths it
     needs to do things.
     """
     b = BranchManager()
     self.assertNotEqual(b.svnProjectsDir, None)
     self.assertNotEqual(b.sitePathsPath, None)
     self.assertNotEqual(b.binCachePath, None)
예제 #3
0
 def test_pathsEnvironment(self):
     """
     Verify that BranchManager draws from the environment for the paths
     path.
     """
     self.changeEnvironment("COMBINATOR_PATHS", "pathdir")
     b = BranchManager()
     self.assertEqual(b.sitePathsPath, os.path.abspath("pathdir"))
     self.assertEqual(b.binCachePath, "pathdir/bincache")
예제 #4
0
 def test_missingUserSitePackages(self):
     """
     L{BranchManager.getPaths} should return an iterable which does not
     have as an element the user-specific site-packages directory, if
     that directory does not exist.
     """
     home = self.mktemp()
     self.changeEnvironment('HOME', home)
     b = BranchManager()
     self.assertNotIn(self._perUserSitePackages(home), list(b.getPaths()))
예제 #5
0
 def setUp(self):
     """
     Create a branch manager with temporary directories for all its working
     filesystem paths.
     """
     self.paths = self.mktemp()
     self.projects = self.mktemp()
     os.makedirs(self.paths)
     os.makedirs(self.projects)
     self.manager = BranchManager(self.paths, self.projects)
     self.cwd = os.getcwd()
     self.repositories = FilePath(self.mktemp())
예제 #6
0
 def test_userSitePackages(self):
     """
     L{BranchManager.getPaths} should return an iterable which has as an
     element the user-specific site-packages directory, if that directory
     exists.
     """
     home = self.mktemp()
     sitePackages = self._perUserSitePackages(home)
     os.makedirs(sitePackages)
     self.changeEnvironment('HOME', home)
     b = BranchManager()
     self.assertIn(sitePackages, list(b.getPaths()))