From 6c1faef799095f3990e9970bc2cb10aa0221cf9c Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sat, 12 Jun 2010 17:20:43 +0200 Subject: Removed odb from project, it is now used as a submodule named gitdb, which was added instead Adjusted all imports to deal with the changed package names --- test/git/performance/test_streams.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'test/git/performance/test_streams.py') diff --git a/test/git/performance/test_streams.py b/test/git/performance/test_streams.py index 8f600cb3..36d0d29c 100644 --- a/test/git/performance/test_streams.py +++ b/test/git/performance/test_streams.py @@ -1,28 +1,21 @@ """Performance data streaming performance""" from test.testlib import * -from git.odb import * +from gitdb import * -from cStringIO import StringIO from time import time import os import sys import stat import subprocess +from gitdb.test.lib import make_memory_file from lib import ( TestBigRepoR ) -def make_memory_file(size_in_bytes, randomize=False): - """:return: tuple(size_of_stream, stream) - :param randomize: try to produce a very random stream""" - d = make_bytes(size_in_bytes, randomize) - return len(d), StringIO(d) - - class TestObjDBPerformance(TestBigRepoR): large_data_size_bytes = 1000*1000*10 # some MiB should do it @@ -30,6 +23,8 @@ class TestObjDBPerformance(TestBigRepoR): @with_bare_rw_repo def test_large_data_streaming(self, rwrepo): + # TODO: This part overlaps with the same file in gitdb.test.performance.test_stream + # It should be shared if possible ldb = LooseObjectDB(os.path.join(rwrepo.git_dir, 'objects')) for randomize in range(2): -- cgit v1.2.1