summaryrefslogtreecommitdiff
path: root/test/git/test_index.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-24 00:08:33 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-24 00:08:33 +0200
commitf9cec00938d9059882bb8eabdaf2f775943e00e5 (patch)
tree049935780c32f2c27b9b301bc0277cad19222783 /test/git/test_index.py
parentb999cae064fb6ac11a61a39856e074341baeefde (diff)
downloadgitpython-f9cec00938d9059882bb8eabdaf2f775943e00e5.tar.gz
index.commit: implemented initial version, but in fact some more changes are required to have a nice API. Tests are not yet fully done either
Diffstat (limited to 'test/git/test_index.py')
-rw-r--r--test/git/test_index.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/git/test_index.py b/test/git/test_index.py
index 2f8fed32..0a5f4c35 100644
--- a/test/git/test_index.py
+++ b/test/git/test_index.py
@@ -236,6 +236,18 @@ class TestTree(TestBase):
assert len(deleted_files) > 1
self.failUnlessRaises(ValueError, index.remove, ["/doesnt/exists"])
+ # test committing
+ # commit changed index
+ cur_commit = rw_repo.head.commit
+ commit_message = "commit default head"
+ new_commit = index.commit(commit_message)
+ assert new_commit.message == commit_message
+ assert new_commit.parents[0] == cur_commit
+
+ self.fail("commit with no parents")
+ self.fail("commit multiple parents")
+
+
# re-add all files in lib
self.fail( "add, commit, working tree handling" )