summaryrefslogtreecommitdiff
path: root/test/git/performance/test_streams.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-06-12 17:20:43 +0200
committerSebastian Thiel <byronimo@gmail.com>2010-06-12 17:20:43 +0200
commit6c1faef799095f3990e9970bc2cb10aa0221cf9c (patch)
treea79a69fa46df39eb794875f374b74110dfe091e1 /test/git/performance/test_streams.py
parent86ea63504f3e8a74cfb1d533be9d9602d2d17e27 (diff)
downloadgitpython-6c1faef799095f3990e9970bc2cb10aa0221cf9c.tar.gz
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
Diffstat (limited to 'test/git/performance/test_streams.py')
-rw-r--r--test/git/performance/test_streams.py13
1 files changed, 4 insertions, 9 deletions
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):