From fa98250e1dd7f296b36e0e541d3777a3256d676c Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 26 Nov 2009 15:41:18 +0100 Subject: SymbolicReference is now the base for all references, allowing them to appear litereally anywhere. A 'default' reference is nothing more than a detached symbolic reference. Added method iterate the packed refs file --- test/git/test_refs.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'test/git/test_refs.py') diff --git a/test/git/test_refs.py b/test/git/test_refs.py index 1eceb162..606346cf 100644 --- a/test/git/test_refs.py +++ b/test/git/test_refs.py @@ -64,7 +64,7 @@ class TestRefs(TestBase): types_found = set() for ref in self.rorepo.refs: types_found.add(type(ref)) - assert len(types_found) == 4 + assert len(types_found) == 3 @with_rw_repo('0.1.6') def test_head_reset(self, rw_repo): @@ -192,7 +192,7 @@ class TestRefs(TestBase): # setting a non-commit as commit fails, but succeeds as object head_tree = head.commit.tree - self.failUnlessRaises(GitCommandError, setattr, head, 'commit', head_tree) + self.failUnlessRaises(ValueError, setattr, head, 'commit', head_tree) assert head.commit == old_commit # and the ref did not change self.failUnlessRaises(GitCommandError, setattr, head, 'object', head_tree) @@ -255,9 +255,3 @@ class TestRefs(TestBase): assert active_branch in heads assert rw_repo.tags - # NOTE: It appears git-cat-file cannot resolve refs which are packed ! - # At least it fails here for some reason - # Couldn't reproduce the bug in a simple example though ... lets see. - self.failUnlessRaises(ValueError, getattr, new_head, 'commit') - self.failUnlessRaises(ValueError, getattr, symref, "commit") - -- cgit v1.2.1