Ejemplo n.º 1
0
 def test_expand(self):
     filenames = ["a.py", "b/c.py"]
     with file_utils.Tempdir() as d:
         for f in filenames:
             d.create_file(f)
         with file_utils.cd(d.path):
             self.assertEqual(file_utils.expand_globpaths(["**/*.py"]),
                              [os.path.realpath(f) for f in filenames])
Ejemplo n.º 2
0
 def test_expand_with_cwd(self):
     filenames = ["a.py", "b/c.py"]
     with file_utils.Tempdir() as d:
         for f in filenames:
             d.create_file(f)
         self.assertEqual(
             file_utils.expand_globpaths(["**/*.py"], cwd=d.path),
             [os.path.join(d.path, f) for f in filenames])
Ejemplo n.º 3
0
 def test_expand_empty(self):
     self.assertEqual(file_utils.expand_globpaths([]), [])