def test_ls(self): #Function ls list = shex.ls("../*") list.sort() logging.debug("shex ls: %s" %list) raw_list = os.listdir("..") cmp_list = [] for item in raw_list: if item[0] != ".": cmp_list.append("../%s" %item) cmp_list.sort() logging.debug(cmp_list) assert(list==cmp_list)
def bad_ls(self): list = shex.ls("bad/dir/*") assert(not list)