# HG changeset patch # User Mads Kiilerich # Date 2018-01-27 23:16:18 # Node ID f200ce5efce60cb63e071da106acabf3c0a98c78 # Parent 3020943319f7306212d27326ffbb9b7ac106966b tests: enable disabled Git branch tests, with comments that the current results seem wrong diff --git a/kallithea/tests/vcs/test_git.py b/kallithea/tests/vcs/test_git.py --- a/kallithea/tests/vcs/test_git.py +++ b/kallithea/tests/vcs/test_git.py @@ -304,27 +304,25 @@ class TestGitChangeset(object): .get_node('index.rst') def test_branch_and_tags(self): - """ + # Those tests seem to show wrong results: + # in Git, only heads have a branch - most changesets don't rev0 = self.repo.revisions[0] chset0 = self.repo.get_changeset(rev0) - assert chset0.branch == 'master' + assert chset0.branch is None # should be 'master'? assert chset0.tags == [] rev10 = self.repo.revisions[10] chset10 = self.repo.get_changeset(rev10) - assert chset10.branch == 'master' + assert chset10.branch is None # should be 'master'? assert chset10.tags == [] rev44 = self.repo.revisions[44] chset44 = self.repo.get_changeset(rev44) - assert chset44.branch == 'web-branch' + assert chset44.branch is None # should be 'web-branch'? tip = self.repo.get_changeset('tip') - assert 'tip' in tip.tags - """ - # Those tests would fail - branches are now going - # to be changed at main API in order to support git backend - pass + assert 'tip' not in tip.tags # it should be? + assert not tip.tags # how it is! def _test_slices(self, limit, offset): count = self.repo.count()