예제 #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
파일: function.py 프로젝트: bialimed/miams
    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')