def test_utils_on_custom_target(self):
     # gitify always works under the assumption, that the package
     # name is the name of the directory it's been invoked in.
     self.checkout('trunk')
     self.failUnlessEqual(basename(), 'testpackage')
     new_checkoutdir = ("%s/trunk" % self.tempdir)
     os.rename(self.checkoutdir, new_checkoutdir)
     self.checkoutdir = new_checkoutdir
     self.failIfEqual(basename(), 'testpackage')
 def test_utils_on_tag(self):
     self.checkout('tags/0.1')
     self.failUnless(is_svn())
     self.failIf(is_git())
     self.failUnlessEqual(svn_type(), 'tags')
     self.failUnlessEqual(basename(), 'testpackage')
     self.failUnlessEqual(svn_branch(), '0.1')
     self.failUnless(svn_url().endswith('/testpackage/tags/0.1'))
     self.failUnless(base_url().endswith('/testpackage/'))
 def test_utils_on_branch(self):
     self.checkout('branches/feature-bar')
     self.failUnless(is_svn())
     self.failIf(is_git())
     self.failUnlessEqual(svn_type(), 'branches')
     self.failUnlessEqual(basename(), 'testpackage')
     self.failUnlessEqual(svn_branch(), 'feature-bar')
     self.failUnless(svn_url().endswith('/testpackage/branches/feature-bar'))
     self.failUnless(base_url().endswith('/testpackage/'))
 def test_utils_on_tag(self):
     self.checkout('tags/0.1')
     self.failUnless(is_svn())
     self.failIf(is_git())
     self.failIf(is_git_link())
     self.failUnlessEqual(svn_type(), 'tags')
     self.failUnlessEqual(basename(), 'testpackage')
     self.failUnlessEqual(svn_branch(), '0.1')
     self.failUnless(svn_url().endswith('/testpackage/tags/0.1'))
     self.failUnless(base_url().endswith('/testpackage/'))
 def test_utils_on_branch(self):
     self.checkout('branches/feature-bar')
     self.failUnless(is_svn())
     self.failIf(is_git())
     self.failIf(is_git_link())
     self.failUnlessEqual(svn_type(), 'branches')
     self.failUnlessEqual(basename(), 'testpackage')
     self.failUnlessEqual(svn_branch(), 'feature-bar')
     self.failUnless(svn_url().endswith('/testpackage/branches/feature-bar'))
     self.failUnless(base_url().endswith('/testpackage/'))