Exemplo n.º 1
0
 def test_combinatorEnvironment(self):
     """
     Verify that generatePathVariable will set the appropriate Combinator
     environment variables.
     """
     e = Env(StringIO(), {})
     generatePathVariable(e, "alpha", "beta", StringIO())
     self.assertEqual(e.d['COMBINATOR_PROJECTS'], os.path.abspath("alpha"))
     self.assertEqual(e.d['COMBINATOR_PATHS'], os.path.abspath("beta"))
Exemplo n.º 2
0
 def test_combinatorEnvironment(self):
     """
     Verify that generatePathVariable will set the appropriate Combinator
     environment variables.
     """
     e = Env(StringIO(), {})
     generatePathVariable(e, "alpha", "beta", StringIO())
     self.assertEqual(e.d['COMBINATOR_PROJECTS'], os.path.abspath("alpha"))
     self.assertEqual(e.d['COMBINATOR_PATHS'], os.path.abspath("beta"))
Exemplo n.º 3
0
    def test_executableCreation(self):
        """
        Test that Combinator creates scripts for files in the
        /bin subdirectories of projects it manages.
        """
        e = Env(StringIO(), {})
        alpha = self.mktemp()
        beta = self.mktemp()
        os.mkdir(alpha)
        os.mkdir(beta)
        binDir = os.path.join(alpha, "Foo", "trunk", "bin")
        os.makedirs(binDir)
        binFile = os.path.join(binDir, "thingy")
        file(binFile, 'w')
        file(os.path.join(beta, "Foo.bch"), 'w').write("trunk\n")
        syspath = []
        m = generatePathVariable(e, alpha, beta, StringIO())

        m.addPaths()
        m.createExecutables(stream=StringIO())
        self.failUnless(os.path.exists(os.path.join(beta, "bincache",
                                                    "thingy")))
Exemplo n.º 4
0
    def test_executableCreation(self):
        """
        Test that Combinator creates scripts for files in the
        /bin subdirectories of projects it manages.
        """
        e = Env(StringIO(), {})
        alpha = self.mktemp()
        beta = self.mktemp()
        os.mkdir(alpha)
        os.mkdir(beta)
        binDir = os.path.join(alpha, "Foo", "trunk", "bin")
        os.makedirs(binDir)
        binFile = os.path.join(binDir, "thingy")
        file(binFile, 'w')
        file(os.path.join(beta, "Foo.bch"), 'w').write("trunk\n")
        syspath = []
        m = generatePathVariable(e, alpha, beta, StringIO())

        m.addPaths()
        m.createExecutables(stream=StringIO())
        self.failUnless(
            os.path.exists(os.path.join(beta, "bincache", "thingy")))