Пример #1
0
 def test_walkdir_ignore(self):
     """ Test ignoring files.
     """
     root = self.__create_dir()
     os.mkdir(os.path.join(root, ".svn"))
     entered = []
     for dpath, dnames, fnames in util.walkdir(root, ignore=[".svn"]):
         entered.append(dpath)
     self.assertEqual(entered, [root, os.path.join(root, "testdir")])
Пример #2
0
 def test_walkdir(self):
     entered = []
     root = self.__create_dir()
     for dpath, dnames, fnames in util.walkdir(root):
         entered.append(dpath)
     self.assertEqual(entered, [root, os.path.join(root, "testdir")])