diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2009-10-19 22:49:52 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2009-10-19 22:59:15 +0200 |
commit | 0b3ecf2dcace76b65765ddf1901504b0b4861b08 (patch) | |
tree | 04fad7e2ac3f85afe7fe28a5e6907b8a88abfaba /test/git/test_repo.py | |
parent | 11b1f6edc164e2084e3ff034d3b65306c461a0be (diff) | |
download | gitpython-0b3ecf2dcace76b65765ddf1901504b0b4861b08.tar.gz |
commit.count: is an instance method now
repo: added head , tag and iter_trees methods for completeness
changes: headlines now sorted chronologically
Diffstat (limited to 'test/git/test_repo.py')
-rw-r--r-- | test/git/test_repo.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/git/test_repo.py b/test/git/test_repo.py index 0d8a473d..197a29cb 100644 --- a/test/git/test_repo.py +++ b/test/git/test_repo.py @@ -67,6 +67,16 @@ class TestRepo(TestCase): assert_true(git.called) + def test_trees(self): + mc = 30 + num_trees = 0 + for tree in self.repo.iter_trees('0.1.5', max_count=mc): + num_trees += 1 + assert isinstance(tree, Tree) + # END for each tree + assert num_trees == mc + + @patch_object(Repo, '__init__') @patch_object(Git, '_call_process') def test_init(self, git, repo): @@ -170,6 +180,9 @@ class TestRepo(TestCase): def test_head(self): assert self.repo.head.object == self.repo.active_branch.object + def test_tag(self): + assert self.repo.tag('0.1.5').commit + @patch_object(Git, '_call_process') def test_should_display_blame_information(self, git): git.return_value = fixture('blame') |