From 9a119924bd314934158515a1a5f5877be63f6f91 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sun, 11 Oct 2009 20:21:22 +0200 Subject: fixed issue in Ref.name implementation which would not handle components properly --- test/git/test_head.py | 16 +++++----------- test/git/test_tag.py | 2 +- 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'test/git') diff --git a/test/git/test_head.py b/test/git/test_head.py index 8338552f..b8380838 100644 --- a/test/git/test_head.py +++ b/test/git/test_head.py @@ -11,16 +11,11 @@ class TestHead(object): def setup(self): self.repo = Repo(GIT_REPO) - @patch_object(Git, '_call_process') - def test_repr(self, git): - git.return_value = fixture('for_each_ref') - - head = self.repo.heads[0] - - assert_equal('' % head.name, repr(head)) - - assert_true(git.called) - assert_equal(git.call_args, (('for_each_ref', 'refs/heads'), {'sort': 'committerdate', 'format': '%(refname)%00%(objectname)'})) + def test_base(self): + for head in self.repo.heads: + assert head.name + assert "refs/heads" in head.path + # END for each head @patch_object(Git, '_call_process') def test_ref_with_path_component(self, git): @@ -29,4 +24,3 @@ class TestHead(object): assert_equal('refactoring/feature1', head.name) assert_true(git.called) - assert_equal(git.call_args, (('for_each_ref', 'refs/heads'), {'sort': 'committerdate', 'format': '%(refname)%00%(objectname)'})) diff --git a/test/git/test_tag.py b/test/git/test_tag.py index 52f7898c..fe3f78cc 100644 --- a/test/git/test_tag.py +++ b/test/git/test_tag.py @@ -18,7 +18,7 @@ class TestTag(object): tag_object_refs = list() for tag in self.repo.tags: assert "refs/tags" in tag.path - assert "/" not in tag.name + assert tag.name assert isinstance( tag.commit, Commit ) if tag.tag is not None: tag_object_refs.append( tag ) -- cgit v1.2.3