diff options
author | Steve Frécinaux <code@istique.net> | 2008-09-06 00:10:12 +0200 |
---|---|---|
committer | Steve Frécinaux <code@istique.net> | 2008-09-06 00:13:09 +0200 |
commit | 0425bc64384fe9a6a22edb7831d6e8c1756e2c7e (patch) | |
tree | d029b6f65e0bc56c292f8078b1843da9e73b69dc /test/git/test_repo.py | |
parent | 43eb1edf93c381bf3f3809a809df33dae23b50d9 (diff) | |
download | gitpython-0425bc64384fe9a6a22edb7831d6e8c1756e2c7e.tar.gz |
Implement dict protocol for trees.
It is rather intuitive to consider trees as a dict of objects (like
a directory could be seen as a dict of files).
Diffstat (limited to 'test/git/test_repo.py')
-rw-r--r-- | test/git/test_repo.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/git/test_repo.py b/test/git/test_repo.py index c7a4c01b..3c323878 100644 --- a/test/git/test_repo.py +++ b/test/git/test_repo.py @@ -96,8 +96,8 @@ class TestRepo(object): tree = self.repo.tree('master') - assert_equal(4, len([c for c in tree.contents.values() if isinstance(c, Blob)])) - assert_equal(3, len([c for c in tree.contents.values() if isinstance(c, Tree)])) + assert_equal(4, len([c for c in tree.values() if isinstance(c, Blob)])) + assert_equal(3, len([c for c in tree.values() if isinstance(c, Tree)])) assert_true(git.called) assert_equal(git.call_args, (('ls_tree', 'master'), {})) |