summaryrefslogtreecommitdiff
path: root/git/test/db/dulwich/lib.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2011-07-07 23:37:19 +0200
committerSebastian Thiel <byronimo@gmail.com>2011-07-07 23:37:19 +0200
commit023dc1244c02d415bb964eeb0b51b257523897df (patch)
tree2ebffe75f484d48a8fdc2c282a457cf77a86c3cf /git/test/db/dulwich/lib.py
parent2baf8a493618463d2bb41b8e96c8304bf48e2c8a (diff)
parentf4f330f8588dacd43af6513e1e1e1a50237da1e7 (diff)
downloadgitpython-023dc1244c02d415bb964eeb0b51b257523897df.tar.gz
Merge branch 'dulwich'
Diffstat (limited to 'git/test/db/dulwich/lib.py')
-rw-r--r--git/test/db/dulwich/lib.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/git/test/db/dulwich/lib.py b/git/test/db/dulwich/lib.py
new file mode 100644
index 00000000..56734064
--- /dev/null
+++ b/git/test/db/dulwich/lib.py
@@ -0,0 +1,23 @@
+"""dulwich specific utilities, as well as all the default ones"""
+
+from git.test.lib import (
+ InheritedTestMethodsOverrideWrapperMetaClsAutoMixin,
+ needs_module_or_skip
+ )
+
+__all__ = ['needs_dulwich_or_skip', 'DulwichRequiredMetaMixin']
+
+#{ Decoorators
+
+def needs_dulwich_or_skip(func):
+ """Skip this test if we have no dulwich - print warning"""
+ return needs_module_or_skip('dulwich')(func)
+
+#}END decorators
+
+#{ MetaClasses
+
+class DulwichRequiredMetaMixin(InheritedTestMethodsOverrideWrapperMetaClsAutoMixin):
+ decorator = [needs_dulwich_or_skip]
+
+#} END metaclasses