From b67bd4c730273a9b6cce49a8444fb54e654de540 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 15 Oct 2009 18:05:28 +0200 Subject: 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 --- test/git/test_repo.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'test/git/test_repo.py') 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): -- cgit v1.2.1