summaryrefslogtreecommitdiff
path: root/git/test/db/pygit2
diff options
context:
space:
mode:
Diffstat (limited to 'git/test/db/pygit2')
-rw-r--r--git/test/db/pygit2/lib.py8
-rw-r--r--git/test/db/pygit2/test_base.py10
2 files changed, 9 insertions, 9 deletions
diff --git a/git/test/db/pygit2/lib.py b/git/test/db/pygit2/lib.py
index fab762e7..76441333 100644
--- a/git/test/db/pygit2/lib.py
+++ b/git/test/db/pygit2/lib.py
@@ -1,14 +1,15 @@
"""pygit2 specific utilities, as well as all the default ones"""
from git.test.lib import (
- InheritedTestMethodsOverrideWrapperMetaClsAutoMixin,
- needs_module_or_skip
- )
+ InheritedTestMethodsOverrideWrapperMetaClsAutoMixin,
+ needs_module_or_skip
+)
__all__ = ['needs_pygit2_or_skip', 'Pygit2RequiredMetaMixin']
#{ Decoorators
+
def needs_pygit2_or_skip(func):
"""Skip this test if we have no pygit2 - print warning"""
return needs_module_or_skip('pygit2')(func)
@@ -17,6 +18,7 @@ def needs_pygit2_or_skip(func):
#{ MetaClasses
+
class Pygit2RequiredMetaMixin(InheritedTestMethodsOverrideWrapperMetaClsAutoMixin):
decorator = [needs_pygit2_or_skip]
diff --git a/git/test/db/pygit2/test_base.py b/git/test/db/pygit2/test_base.py
index 52ee24f5..dc1b0ac5 100644
--- a/git/test/db/pygit2/test_base.py
+++ b/git/test/db/pygit2/test_base.py
@@ -7,7 +7,6 @@ from git.test.lib import TestBase, with_rw_repo
from git.test.db.base import RepoBase
-
try:
import pygit2
except ImportError:
@@ -17,16 +16,15 @@ except ImportError:
else:
# now we know pygit2 is available, to do futher imports
from git.db.pygit2.complex import Pygit2CompatibilityGitDB as Pygit2DB
-
-#END handle imports
+
+# END handle imports
+
class TestPyGit2DBBase(RepoBase):
__metaclass__ = Pygit2RequiredMetaMixin
RepoCls = Pygit2DB
-
+
@needs_pygit2_or_skip
@with_rw_repo('HEAD', bare=False)
def test_basics(self, rw_repo):
db = Pygit2DB(rw_repo.working_tree_dir)
-
-