示例#1
0
def _interesting_fnames_in_proj(project_dir, interesting_fnames_res,
                                boring_fnames_res):
    """
    Return a list of the interesting fnames in the project dir, using
    the logic of interesting.is_interesting_fname.
    """
    interesting_fnames = []

    for fname in project.ls(project_dir):
        rel_fname = util.rel_fname(project_dir, fname)
        if is_interesting_fname(rel_fname, interesting_fnames_res,
                                boring_fnames_res):
            interesting_fnames.append(fname)
        else:
            log.info("Skipping fname %s, not interesting" % fname)

    return interesting_fnames
示例#2
0
def _interesting_fnames_in_proj(project_dir, interesting_fnames_res,
                                boring_fnames_res):
    """
    Return a list of the interesting fnames in the project dir, using
    the logic of interesting.is_interesting_fname.
    """
    interesting_fnames = []

    for fname in project.ls(project_dir):
        rel_fname = util.rel_fname(project_dir, fname)
        if is_interesting_fname(rel_fname,
                                interesting_fnames_res,
                                boring_fnames_res):
            interesting_fnames.append(fname)
        else:
            log.info("Skipping fname %s, not interesting" % fname)

    return interesting_fnames
示例#3
0
def _check_interesting_fname(interesting_res, boring_res, fname, expected):
    eq_(
        expected,
        is_interesting_fname(fname, [re.compile(r) for r in interesting_res],
                             [re.compile(r) for r in boring_res]))
示例#4
0
def _check_interesting_fname(interesting_res, boring_res, fname, expected):
    eq_(
        expected,
        is_interesting_fname(fname, [re.compile(r) for r in interesting_res], [re.compile(r) for r in boring_res]),
    )