Example #1
0
def test_walk_altdir():
    files = []
    with temporary_dir() as td:
        for k in range(10):
            filename = os.path.join(td, "%010d" % k)
            with open(filename, "w") as fp:
                fp.write("booyeah")
            files.append(filename)
        assert set(RealFileset.zglobs("*", root=td)) == set(os.path.basename(fn) for fn in files)
Example #2
0
def test_walk_altdir():
    files = []
    with temporary_dir() as td:
        for k in range(10):
            filename = os.path.join(td, '%010d' % k)
            with open(filename, 'w') as fp:
                fp.write('booyeah')
            files.append(filename)
        assert set(RealFileset.zglobs('*', root=td)) == set(
            os.path.basename(fn) for fn in files)
 def _combined_invalidating_fileset_from_globs(glob_strs, root):
   return set.union(*(Fileset.globs(glob_str, root=root)() for glob_str in glob_strs))
    def __call__(self, base_url, sources):
        def fetch():
            atexit.register(self.cleanup)
            return self._fetch(base_url, sources)

        return Fileset(fetch)
 def _combined_invalidating_fileset_from_globs(glob_strs, root):
   return set.union(*(Fileset.globs(glob_str, root=root)() for glob_str in glob_strs))