示例#1
0
    def blacklist(self) -> List[str]:
        """ Return a full blacklist for use with `fs.filtered_walk()` """
        from peltak.core import git

        exclude = list(self.exclude)

        # prepare
        if self.use_gitignore:
            exclude += git.ignore()

        if not self.untracked:
            exclude += git.untracked()

        return exclude
示例#2
0
def test_works_if_parse_data_is_bytes(app_conf):
    util.cached_result.clear(git.ignore)
    assert frozenset(git.ignore()) == frozenset(
        ('pattern1', 'pattern2', 'pattern3'))
    util.cached_result.clear(git.ignore)
示例#3
0
def test_strips_whitespace(app_conf):
    util.cached_result.clear(git.ignore)
    assert frozenset(git.ignore()) == frozenset(
        ('pattern1', 'pattern2', 'pattern3'))
    util.cached_result.clear(git.ignore)
示例#4
0
def test_skips_empty_lines(app_conf):
    util.cached_result.clear(git.ignore)
    assert frozenset(git.ignore()) == frozenset(
        ('pattern1', 'pattern2', 'pattern3'))
    util.cached_result.clear(git.ignore)
示例#5
0
def test_returns_all_patterns(app_conf):
    util.cached_result.clear(git.ignore)
    assert frozenset(git.ignore()) == frozenset(
        ('pattern1', 'pattern2', 'pattern3'))
    util.cached_result.clear(git.ignore)