def test_check_distribution_exists(self): """Check that the parent repository is not on master branch""" folder = self.user_buildout_repo.working_tree_dir release = ReleaseDistribution(folder) release._check_distribution_exists() self.assertTrue( os.path.exists(folder) )
def test_check_parent_branch_on_master(self): """Check that the parent repository is on master branch""" folder = self.user_buildout_repo.working_tree_dir release = ReleaseDistribution(folder) with wrap_folder(folder): release._check_parent_branch() self.assertEqual( self.user_buildout_repo.active_branch.name, 'master' )
def test_get_version(self): """Check that the latest tag is returned""" folder = self.user_buildout_repo.working_tree_dir release = ReleaseDistribution(folder) self._commit(self.user_buildout_repo) self.user_buildout_repo.create_tag('4.9') self._commit(self.user_buildout_repo) self.user_buildout_repo.create_tag('4.11') self.assertEqual( release.get_version(), '4.11' )