Example #1
0
    def runTest(self):
        paths = list(rglob(join('rglob0', '*.txt')))
        assert len(paths) == 1, paths
        assert paths[0] == join('rglob0', 'rglob0.txt')

        paths = list(rglob(join('rglob0', 'rglob1', '*.txt')))
        assert len(paths) == 1, paths
        assert paths[0] == join('rglob0', 'rglob1', 'rglob1.txt')

        paths = list(rglob(join('rglob0', '**', '*.txt')))
        assert len(paths) == 3, paths
        assert paths[0] == join('rglob0', 'rglob0.txt')
        assert paths[1] == join('rglob0', 'rglob1', 'rglob1.txt')
        assert paths[2] == join('rglob0', 'rglob1', 'rglob2', 'rglob2.txt')
Example #2
0
    def runTest(self):
        paths = list(rglob('rglob0'))
        assert len(paths) == 1, paths
        assert paths[0] == 'rglob0', paths[0]

        paths = list(rglob(join('rglob0', '*')))
        assert len(paths) == 1, paths
        assert paths[0] == join('rglob0', 'rglob1'), paths[0]

        paths = list(rglob(join('rglob0', '*', 'rglob2')))
        assert len(paths) == 1, paths
        assert paths[0] == join('rglob0', 'rglob1', 'rglob2'), paths[0]

        paths = list(rglob(join('rglob0', '**')))
        assert len(paths) == 2, paths
        assert paths[0] == join('rglob0', 'rglob1'), paths[0]
        assert paths[1] == join('rglob0', 'rglob1', 'rglob2'), paths[1]

        paths = list(rglob(join('rglob0', '**', 'rglob2')))
        assert len(paths) == 1, paths
        assert paths[0] == join('rglob0', 'rglob1', 'rglob2'), paths[0]

        paths = list(rglob(join('rglob0', 'rgl*1*')))
        assert len(paths) == 1, paths
        assert paths[0] == join('rglob0', 'rglob1'), paths[0]
Example #3
0
        LIBS_EXPANDED[project_name][platform] = deduplist(LIBS_EXPANDED[project_name][platform])
LIBS = LIBS_EXPANDED


INCLUDE_FILE_PATHS = {}
SOURCE_DIR_PATHS = {}
SOURCE_FILE_PATHS = {}

for project_name in PROJECT_NAMES:
    project_include_dir_path = path_join(YIELD_INCLUDE_DIR_PATH, path_sep.join(project_name.split('.')))
    INCLUDE_FILE_PATHS[project_name] = []
    for platform in list(PLATFORMS) + ['']:
        if exists(path_join(project_include_dir_path, platform)):
            for fnmatch_pattern in INCLUDE_FILE_FNMATCH_PATTERNS:
                INCLUDE_FILE_PATHS[project_name].extend(
                    list(rglob(path_join(project_include_dir_path, platform, fnmatch_pattern)))
                )
    INCLUDE_FILE_PATHS[project_name].sort()
    INCLUDE_FILE_PATHS[project_name + '_test'] = []

    for project_name_, project_source_dir_path in (
            (project_name, path_join(YIELD_SRC_DIR_PATH, path_sep.join(project_name.split('.')))),
            (project_name + '_test', path_join(YIELD_TEST_DIR_PATH, path_sep.join(project_name.split('.'))))
        ):
        SOURCE_DIR_PATHS[project_name_] = project_source_dir_path
        SOURCE_FILE_PATHS[project_name_] = []
        for platform in list(PLATFORMS) + ['']:
            if exists(path_join(project_source_dir_path, platform)):
                for fnmatch_pattern in INCLUDE_FILE_FNMATCH_PATTERNS + SOURCE_FILE_FNMATCH_PATTERNS:
                    SOURCE_FILE_PATHS[project_name_].extend(
                        list(rglob(path_join(project_source_dir_path, platform, fnmatch_pattern)))