def test_iter_files_with_maxdepth(self): from xoutil.fs import iter_files res = list(iter_files(self.base, '(?xi)/Z', maxdepth=3)) self.assertEquals(1, len(res)) self.assertIn(self.files[-1][-1], res) res = list(iter_files(self.base, '(?xi)/Z', maxdepth=2)) self.assertEquals(0, len(res))
def test_iter_files_with_regex_pattern(self): from xoutil.fs import iter_files res = list(iter_files(self.base, '(?xi)/Z')) self.assertEquals(2, len(res)) self.assertIn(self.files[-3][-1], res) self.assertIn(self.files[-1][-1], res)