def test_ignore_file(tmpdir): mktree(tmpdir, tree) watcher = DefaultWatcher(str(tmpdir)) sleep(0.01) tmpdir.join('foo/spam.pyc').write('foobar') assert watcher.check() == set()
def test_ignore_dir(tmpdir): mktree(tmpdir, tree) watcher = DefaultWatcher(str(tmpdir)) sleep(0.01) tmpdir.join('foo/.git/abc').write('xxx') assert watcher.check() == set()
def __init__(self, root_path : List[str]): self.watchers = [ DefaultWatcher(p) for p in root_path]