def test_list_file_empty_dirs(self): l = base.list_tree(self.p11, create_empty_dirs=True) self.assertEquals( l, [self.p11] )
def test_list_file_exclude_paths(self): l = base.list_tree(self.p11, exclude_paths=[self.p1]) self.assertEquals( l, [] )
def test_list_file(self): l = base.list_tree(self.p11) self.assertEquals( l, [self.p11] )
def test_list_tree_exclude_paths(self): l = base.list_tree(self.BASEDIRNAME, exclude_paths=[self.p1]) self.assertEquals( set(l), set([ self.p21, self.p22, ]) )
def test_list_tree(self): l = base.list_tree(self.BASEDIRNAME) self.assertEquals( set(l), set([ self.p11, self.p21, self.p22, ]))
def test_list_tree_empty_dirs_exclude_paths(self): l = base.list_tree(self.BASEDIRNAME, exclude_paths=[self.p1], create_empty_dirs=True) self.assertEquals( set(l), set([ self.p21, self.p22, os.path.join(self.BASEDIRNAME, '.empty'), os.path.join(self.p2, '.empty'), os.path.join(self.p3, '.empty'), ]) )
def test_list_nonexistant(self): l = base.list_tree('/nonexistent') self.assertEquals(l, [])