summaryrefslogtreecommitdiff
path: root/test/git/test_repo.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-15 18:05:28 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-15 18:05:28 +0200
commitb67bd4c730273a9b6cce49a8444fb54e654de540 (patch)
tree3e3760e5b46095458cf75446330ba2fc25fa23e5 /test/git/test_repo.py
parent00c5497f190172765cc7a53ff9d8852a26b91676 (diff)
downloadgitpython-b67bd4c730273a9b6cce49a8444fb54e654de540.tar.gz
Improved archive function by allowing it to directly write to an output stream - previously it would cache everything to memory and try to provide zipping functionality itself
gitcmd: allows the output stream to be set explicitly which is mainly useful for archiving operations
Diffstat (limited to 'test/git/test_repo.py')
-rw-r--r--test/git/test_repo.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/git/test_repo.py b/test/git/test_repo.py
index cbfc27c4..96d08b91 100644
--- a/test/git/test_repo.py
+++ b/test/git/test_repo.py
@@ -141,11 +141,14 @@ class TestRepo(object):
assert_equal(15, len(diffs))
assert_true(git.called)
- def test_archive_tar(self):
- assert self.repo.archive_tar()
-
- def test_archive_tar_gz(self):
- assert self.repo.archive_tar_gz()
+ def test_archive(self):
+ args = ( tuple(), (self.repo.heads[-1],),(None,"hello") )
+ for arg_list in args:
+ ftmp = os.tmpfile()
+ self.repo.archive(ftmp, *arg_list)
+ ftmp.seek(0,2)
+ assert ftmp.tell()
+ # END for each arg-list
@patch('git.utils.touch')
def test_enable_daemon_serve(self, touch):