示例#1
0
    def __init__(self, executable, cmd_format=None, find_dirs=None,
        environment=None):
        self.cmd_format  = cmd_format or Function.CMD_FORMAT
        self.path        = find_executable(executable, find_dirs)
        self.environment = environment or dict()
        self.includes    = set([self.path])

        debug(D_FUNCTION, 'Created Function {0}({1}, {2})'.format(
            type_str(self), self.path, self.cmd_format))
示例#2
0
    def __init__(self,
                 executable,
                 cmd_format=None,
                 find_dirs=None,
                 environment=None):
        self.cmd_format = cmd_format or Function.CMD_FORMAT
        self.path = find_executable(executable, find_dirs)
        self.environment = environment or dict()
        self.includes = set([self.path])

        debug(
            D_FUNCTION,
            'Created Function {0}({1}, {2})'.format(type_str(self), self.path,
                                                    self.cmd_format))
示例#3
0
文件: util.py 项目: khurtado/cctools
 def test_02_bin_cat(self):
     self.assertEqual(find_executable("weaver.py"), os.path.abspath("weaver.py"))
示例#4
0
文件: util.py 项目: khurtado/cctools
 def test_03_asdffdsa(self):
     with self.assertRaises(WeaverError):
         find_executable("asdffdsa")
示例#5
0
文件: util.py 项目: khurtado/cctools
 def test_01_bin_cat(self):
     self.assertEqual(find_executable("/bin/cat"), "/bin/cat")
示例#6
0
 def test_01_bin_cat(self):
     self.assertEqual(find_executable('/bin/cat'), '/bin/cat')
示例#7
0
文件: util.py 项目: zsurma/cctools
 def test_03_asdffdsa(self):
     with self.assertRaises(WeaverError):
         find_executable('asdffdsa')
示例#8
0
文件: util.py 项目: zsurma/cctools
 def test_02_bin_cat(self):
     self.assertEqual(find_executable('weaver.py'),
                      os.path.abspath('weaver.py'))
示例#9
0
文件: util.py 项目: zsurma/cctools
 def test_01_bin_cat(self):
     self.assertEqual(find_executable('/bin/cat'), '/bin/cat')