From 8c1a87d11df666d308d14e4ae7ee0e9d614296b6 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 2 Jun 2010 12:30:33 +0200 Subject: commit: refactored existing code to decode commits from streams - performance is slightly better git.cmd: added method to provide access to the content stream directly. This is more efficient if large objects are handled, if it is actually used test.helpers: removed unnecessary code --- test/git/test_repo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/git/test_repo.py') diff --git a/test/git/test_repo.py b/test/git/test_repo.py index ce79402a..9316245b 100644 --- a/test/git/test_repo.py +++ b/test/git/test_repo.py @@ -48,6 +48,7 @@ class TestRepo(TestBase): def test_tree_from_revision(self): tree = self.rorepo.tree('0.1.6') + assert len(tree.sha) == 40 assert tree.type == "tree" assert self.rorepo.tree(tree) == tree @@ -56,9 +57,9 @@ class TestRepo(TestBase): @patch_object(Git, '_call_process') def test_commits(self, git): - git.return_value = ListProcessAdapter(fixture('rev_list')) + git.return_value = StringProcessAdapter(fixture('rev_list')) - commits = list( self.rorepo.iter_commits('master', max_count=10) ) + commits = list(self.rorepo.iter_commits('master', max_count=10)) c = commits[0] assert_equal('4c8124ffcf4039d292442eeccabdeca5af5c5017', c.sha) -- cgit v1.2.1