def test_sort_by(self): path = Path(__file__).absolute().parent.parent # pathlibm_mate-project p_list = Path.sort_by_size(path.select_file()) assert is_increasing([p.size for p in p_list]) p_list = Path.sort_by_size(path.select_file(), reverse=True) assert is_decreasing([p.size for p in p_list])
def test_select_file(self): path = Path(__file__).absolute().parent.parent # pathlibm_mate-project for p in path.select_file(): assert p.is_file()