e2e_tests/standard/test_files.py
def _gen_tree_paths(cls, depth, width=3) -> Set:
        """Generates all subdirectories of some random tree directory structure"""
        this_level_dirs = (fake.word() + "/" for _ in range(width))
        if depth == 1:
            return set(this_level_dirs)
        else:
            subpaths = cls._gen_tree_paths(depth=depth - 1, width=width)
            new_paths = set(
                "".join(prod) for prod in product(subpaths, this_level_dirs)
            )
            subpaths.update(new_paths)
            return subpaths
Generates all subdirectories of some random tree directory structure
Generates all subdirectories of some random tree directory structure
Generates all subdirectories of some random tree directory structure
def _gen_tree_paths(cls, depth, width=3) -> Set:
        this_level_dirs = (fake.word() + "/" for _ in range(width))
        if depth == 1:
            return set(this_level_dirs)
        else:
            subpaths = cls._gen_tree_paths(depth=depth - 1, width=width)
            new_paths = set(
                "".join(prod) for prod in product(subpaths, this_level_dirs)
            )
            subpaths.update(new_paths)
            return subpaths
def _gen_tree_paths ( cls , depth , width = 3 ) -> Set : this_level_dirs = ( fake . word ( ) + "/" for _ in range ( width ) ) if depth == 1 : return set ( this_level_dirs ) else : subpaths = cls . _gen_tree_paths ( depth = depth - 1 , width = width ) new_paths = set ( "" . join ( prod ) for prod in product ( subpaths , this_level_dirs ) ) subpaths . update ( new_paths ) return subpaths
Generates all subdirectories of some random tree directory structure
Generates all subdirectories of some random tree directory structure
"""Generates all subdirectories of some random tree directory structure"""
cls
depth
width