summaryrefslogtreecommitdiff
path: root/test/performance/lib.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/performance/lib.py')
-rw-r--r--test/performance/lib.py43
1 files changed, 23 insertions, 20 deletions
diff --git a/test/performance/lib.py b/test/performance/lib.py
index 86f87757..101e2cd4 100644
--- a/test/performance/lib.py
+++ b/test/performance/lib.py
@@ -3,27 +3,21 @@ import logging
import os
import tempfile
-from git import (
- Repo
-)
-from git.db import (
- GitCmdObjectDB,
- GitDB
-)
-from test.lib import (
- TestBase
-)
+from git import Repo
+from git.db import GitCmdObjectDB, GitDB
+from test.lib import TestBase
from git.util import rmtree
import os.path as osp
-#{ Invariants
+# { Invariants
k_env_git_repo = "GIT_PYTHON_TEST_GIT_REPO_BASE"
-#} END invariants
+# } END invariants
-#{ Base Classes
+# { Base Classes
+
class TestBigRepoR(TestBase):
@@ -39,8 +33,8 @@ class TestBigRepoR(TestBase):
* As gitrepo, but uses pure python implementation
"""
- #{ Invariants
- #} END invariants
+ # { Invariants
+ # } END invariants
def setUp(self):
try:
@@ -51,11 +45,17 @@ class TestBigRepoR(TestBase):
repo_path = os.environ.get(k_env_git_repo)
if repo_path is None:
logging.info(
- ("You can set the %s environment variable to a .git repository of" % k_env_git_repo) +
- "your choice - defaulting to the gitpython repository")
+ (
+ "You can set the %s environment variable to a .git repository of"
+ % k_env_git_repo
+ )
+ + "your choice - defaulting to the gitpython repository"
+ )
repo_path = osp.dirname(__file__)
# end set some repo path
- self.gitrorepo = Repo(repo_path, odbt=GitCmdObjectDB, search_parent_directories=True)
+ self.gitrorepo = Repo(
+ repo_path, odbt=GitCmdObjectDB, search_parent_directories=True
+ )
self.puregitrorepo = Repo(repo_path, odbt=GitDB, search_parent_directories=True)
def tearDown(self):
@@ -79,7 +79,9 @@ class TestBigRepoRW(TestBigRepoR):
pass
dirname = tempfile.mktemp()
os.mkdir(dirname)
- self.gitrwrepo = self.gitrorepo.clone(dirname, shared=True, bare=True, odbt=GitCmdObjectDB)
+ self.gitrwrepo = self.gitrorepo.clone(
+ dirname, shared=True, bare=True, odbt=GitCmdObjectDB
+ )
self.puregitrwrepo = Repo(dirname, odbt=GitDB)
def tearDown(self):
@@ -91,4 +93,5 @@ class TestBigRepoRW(TestBigRepoR):
self.puregitrwrepo.git.clear_cache()
self.puregitrwrepo = None
-#} END base classes
+
+# } END base classes