diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-06-02 12:30:33 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-06-02 12:51:05 +0200 |
commit | 8c1a87d11df666d308d14e4ae7ee0e9d614296b6 (patch) | |
tree | 87481ab28367db496886a3801bda37227c10f7ed /test/git/test_repo.py | |
parent | df0892351a394d768489b5647d47b73c24d3ef5f (diff) | |
download | gitpython-8c1a87d11df666d308d14e4ae7ee0e9d614296b6.tar.gz |
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
Diffstat (limited to 'test/git/test_repo.py')
-rw-r--r-- | test/git/test_repo.py | 5 |
1 files changed, 3 insertions, 2 deletions
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) |