summaryrefslogtreecommitdiff
path: root/test/testlib/helper.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/testlib/helper.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/testlib/helper.py')
-rw-r--r--test/testlib/helper.py23
1 files changed, 1 insertions, 22 deletions
diff --git a/test/testlib/helper.py b/test/testlib/helper.py
index 457cc26c..715427c2 100644
--- a/test/testlib/helper.py
+++ b/test/testlib/helper.py
@@ -9,8 +9,6 @@ from git import Repo, Remote, GitCommandError
from unittest import TestCase
import tempfile
import shutil
-import random
-from array import array
import cStringIO
GIT_REPO = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
@@ -27,24 +25,6 @@ def fixture(name):
def absolute_project_path():
return os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
-def make_bytes(size_in_bytes, randomize=False):
- """:return: string with given size in bytes
- :param randomize: try to produce a very random stream"""
- actual_size = size_in_bytes / 4
- producer = xrange(actual_size)
- if randomize:
- producer = list(producer)
- random.shuffle(producer)
- # END randomize
- a = array('i', producer)
- return a.tostring()
-
-
-def make_object(type, data):
- """:return: bytes resembling an uncompressed object"""
- odata = "blob %i\0" % len(data)
- return odata + data
-
#} END routines
#{ Adapters
@@ -87,8 +67,7 @@ def with_bare_rw_repo(func):
it will be removed completely.
Use this if you want to make purely index based adjustments, change refs, create
- heads, generally operations that do not need a working tree.
- """
+ heads, generally operations that do not need a working tree."""
def bare_repo_creator(self):
repo_dir = tempfile.mktemp("bare_repo")
rw_repo = self.rorepo.clone(repo_dir, shared=True, bare=True)