def test_subdirs(self): os.mkdir("_test/dir") os.mkdir("_test/zdir") touch("_test/aaa") touch("_test/eee") touch("_test/dir/aa") children = [x for x in asure.walk("_test")] self.assertEqual(children, [('d', '.'), ('d', 'dir'), ('-', 'aa'), ('u', 'dir'), ('d', 'zdir'), ('u', 'zdir'), ('-', 'aaa'), ('-', 'eee'), ('u', '.')])
def test_single(self): touch("_test/aaaaa") self.assertEqual([x for x in asure.walk("_test")], [('d', '.'), ('-', 'aaaaa'), ('u', '.')])
def test_empty(self): children = [x for x in asure.walk("_test")] self.assertEqual(children, [('d', '.'), ('u', '.')])