diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-06-23 15:48:57 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-06-23 15:48:57 +0200 |
commit | 1e2265a23ecec4e4d9ad60d788462e7f124f1bb7 (patch) | |
tree | 67c56788c74b87e8720562556168f57b439a6ab1 /test/git/test_fun.py | |
parent | aea0243840a46021e6f77c759c960a06151d91c9 (diff) | |
download | gitpython-1e2265a23ecec4e4d9ad60d788462e7f124f1bb7.tar.gz |
fixed critical bug in traverse_trees_recursive, implemented IndexFile.new including simple test, it may be simple as the methods it uses are throroughly tested
Diffstat (limited to 'test/git/test_fun.py')
-rw-r--r-- | test/git/test_fun.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/git/test_fun.py b/test/git/test_fun.py index ce610014..b2b94415 100644 --- a/test/git/test_fun.py +++ b/test/git/test_fun.py @@ -60,6 +60,9 @@ class TestFun(TestBase): M = tree("44a601a068f4f543f73fd9c49e264c931b1e1652") trees = [B.sha, H.sha, M.sha] self._assert_index_entries(aggressive_tree_merge(odb, trees), trees) + + # too many trees + self.failUnlessRaises(ValueError, aggressive_tree_merge, odb, trees*2) def mktree(self, odb, entries): """create a tree from the given tree entries and safe it to the database""" @@ -164,14 +167,10 @@ class TestFun(TestBase): # as one is deleted, there are only 2 entries assert_entries(aggressive_tree_merge(odb, trees), 2, True) # END handle ours, theirs - - - - def _assert_tree_entries(self, entries, num_trees): - assert len(entries[0]) == num_trees for entry in entries: + assert len(entry) == num_trees paths = set(e[2] for e in entry if e) # only one path per set of entries |