summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-16 16:09:07 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-16 16:09:07 +0200
commitbb24f67e64b4ebe11c4d3ce7df021a6ad7ca98f2 (patch)
tree391ba27fa04e7d6ef65fb7d371b07475eb4263c6 /test
parent919164df96d9f956c8be712f33a9a037b097745b (diff)
downloadgitpython-bb24f67e64b4ebe11c4d3ce7df021a6ad7ca98f2.tar.gz
Fixed object bug that would cause object ids not to be resolved to sha's as this was assumed - now there is a test for it as well
repo: removed diff and commit_diff methods, added 'head' property returning the current head as Reference object
Diffstat (limited to 'test')
-rw-r--r--test/git/test_base.py3
-rw-r--r--test/git/test_repo.py3
2 files changed, 6 insertions, 0 deletions
diff --git a/test/git/test_base.py b/test/git/test_base.py
index 04222e2e..71576048 100644
--- a/test/git/test_base.py
+++ b/test/git/test_base.py
@@ -90,3 +90,6 @@ class TestBase(object):
assert_raises( ValueError, get_object_type_by_name, "doesntexist" )
+ def test_object_resolution(self):
+ # objects must be resolved to shas so they compare equal
+ assert self.repo.head.object == self.repo.active_branch.object
diff --git a/test/git/test_repo.py b/test/git/test_repo.py
index 250974a5..e0bda1c5 100644
--- a/test/git/test_repo.py
+++ b/test/git/test_repo.py
@@ -199,6 +199,9 @@ class TestRepo(object):
assert_equal(self.repo.active_branch.name, 'major-refactoring')
assert_equal(git.call_args, (('symbolic_ref', 'HEAD'), {}))
+ def test_head(self):
+ assert self.repo.head.object == self.repo.active_branch.object
+
@patch_object(Git, '_call_process')
def test_should_display_blame_information(self, git):
git.return_value = fixture('blame')