コード例 #1
0
 def test_get_locations(self):
     root_dir = self.get_test_loc('command/bin', copy=True)
     cmd = 'cmd'
     for  test_matrix in self.os_arches_locations_test_matrix:
         _os_arch, _os_noarch, _noarch = test_matrix
         cmd_loc, _ , _ = command.get_locations(cmd, root_dir, _os_arch, _os_noarch, _noarch)
         extension = ''
         if any(x and 'win' in x for x in (_os_arch, _os_noarch, _noarch)):
             extension = '.exe'
         expected_cmd = cmd + extension
         if cmd_loc:
             assert cmd_loc.endswith(expected_cmd)
             assert os.path.exists(cmd_loc)
             assert os.path.isfile(cmd_loc)
コード例 #2
0
 def test_get_locations(self):
     root_dir = self.get_test_loc('command/bin', copy=True)
     cmd = b'cmd'
     for test_matrix in self.os_arches_locations_test_matrix:
         _os_arch, _os_noarch, _noarch = test_matrix
         cmd_loc, _, _ = command.get_locations(cmd, root_dir, _os_arch,
                                               _os_noarch, _noarch)
         extension = b''
         if any(x and b'win' in x for x in (_os_arch, _os_noarch, _noarch)):
             extension = b'.exe'
         expected_cmd = cmd + extension
         if cmd_loc:
             assert cmd_loc.endswith(expected_cmd)
             assert os.path.exists(cmd_loc)
             assert os.path.isfile(cmd_loc)
コード例 #3
0
 def test_get_locations_missing(self):
     assert command.get_locations('ctags', None) == (None, None, None)
     assert command.get_locations('dir', None) == (None, None, None)
     assert command.get_locations('ctags', b'.') == (None, None, None)
コード例 #4
0
 def test_get_locations_missing(self):
     assert command.get_locations('ctags', None) == (None, None, None)
     assert command.get_locations('dir', None) == (None, None, None)
     assert command.get_locations('ctags', '.') == (None, None, None)