summaryrefslogtreecommitdiff
path: root/test/git/test_index.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-22 10:15:47 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-22 10:15:47 +0200
commit30d822a468dc909aac5c83d078a59bfc85fc27aa (patch)
tree41e79c0bd9fe8d47ed2791600e80f6d9f4494ec9 /test/git/test_index.py
parentaa921fee6014ef43bb2740240e9663e614e25662 (diff)
downloadgitpython-30d822a468dc909aac5c83d078a59bfc85fc27aa.tar.gz
index writing now creates a sha on the content making it possible to write valid indices after manually removing or altering entriesgst
Diffstat (limited to 'test/git/test_index.py')
-rw-r--r--test/git/test_index.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/git/test_index.py b/test/git/test_index.py
index 6208a1d9..c8f6f4e3 100644
--- a/test/git/test_index.py
+++ b/test/git/test_index.py
@@ -96,7 +96,14 @@ class TestTree(TestCase):
# pick the first blob at the first stage we find and use it as resolved version
three_way_index.resolve_blobs( l[0][1] for l in unmerged_blob_map.itervalues() )
- three_way_index.write_tree()
+ tree = three_way_index.write_tree()
+ assert isinstance(tree, Tree)
+ num_blobs = 0
+ for blob in tree.traverse(predicate=lambda item: item.type == "blob"):
+ assert (blob.path,0) in three_way_index.entries
+ num_blobs += 1
+ # END for each blob
+ assert num_blobs == len(three_way_index.entries)
def test_custom_commit(self):