From 0b3ecf2dcace76b65765ddf1901504b0b4861b08 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 19 Oct 2009 22:49:52 +0200 Subject: commit.count: is an instance method now repo: added head , tag and iter_trees methods for completeness changes: headlines now sorted chronologically --- test/git/test_repo.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/git/test_repo.py') 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') -- cgit v1.2.1