def test_split_path_into_components(self): empty_path = '' empty_path2 = '/' path = '/a/b' assert split_path_into_components(empty_path) == [] assert split_path_into_components(empty_path2) == [] assert split_path_into_components(path) == ['a', 'b']
def test_split_path_into_components(self): empty_path = "" empty_path2 = "/" path = "/a/b" assert split_path_into_components(empty_path) == [] assert split_path_into_components(empty_path2) == [] assert split_path_into_components(path) == ["a", "b"]
def access(self, path, mode): if hasattr(self, "relative_path") and self.relative_path != "/": path_elems = split_path_into_components(self.relative_path) is_valid_path = self._validate_commit_path(self.commit.tree, path_elems) if not is_valid_path: raise FuseOSError(ENOENT) return 0
def access(self, path, mode): if hasattr(self, "relative_path") and self.relative_path != '/': path_elems = split_path_into_components(self.relative_path) is_valid_path = self._validate_commit_path(self.commit.tree, path_elems) if not is_valid_path: raise FuseOSError(ENOENT) return 0