You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gump.apache.org by le...@apache.org on 2005/07/08 16:35:32 UTC
svn commit: r209792 -
/gump/branches/Gump3/pygump/python/gump/test/testPluginDirBuilder.py
Author: leosimons
Date: Fri Jul 8 07:35:26 2005
New Revision: 209792
URL: http://svn.apache.org/viewcvs?rev=209792&view=rev
Log:
100% coverage for dirbuilder.py
Modified:
gump/branches/Gump3/pygump/python/gump/test/testPluginDirBuilder.py
Modified: gump/branches/Gump3/pygump/python/gump/test/testPluginDirBuilder.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/test/testPluginDirBuilder.py?rev=209792&r1=209791&r2=209792&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/test/testPluginDirBuilder.py (original)
+++ gump/branches/Gump3/pygump/python/gump/test/testPluginDirBuilder.py Fri Jul 8 07:35:26 2005
@@ -57,6 +57,28 @@
plugin._do_rmdir(cmd.project, cmd.directory)
self.assertFalse(isdir(join(ppath,cmd.directory)))
self.assert_(isdir(join(ppath)))
+
+ makedirs(join(ppath, cmd.directory, "nested", "stuff", "here"))
+ makedirs(join(ppath, "somedir2", "nested", "stuff", "here"))
+ makedirs(join(ppath, "elsewhere", "nested", "stuff", "here"))
+
+ p.add_command(cmd)
+ cmd2 = Rmdir(p,"somedir2")
+ p.add_command(cmd2)
+ cmd3 = Rmdir(p,"elsewhere")
+ p.add_command(cmd3)
+ plugin.visit_project(p)
+
+ # failure on bad path
+ cmd = Rmdir(p,join("..", "..", "..", "somedir"))
+ self.assertRaises(Error, plugin._do_rmdir, cmd.project, cmd.directory)
+
+ # failure on bad file
+ cmd = Rmdir(p,"somedir")
+ file = open(join(ppath,cmd.directory),"w")
+ file.write("blah")
+ file.close()
+ self.assertRaises(Error, plugin._do_rmdir, cmd.project, cmd.directory)
finally:
rmtree(basedir)