summaryrefslogtreecommitdiff
path: root/git/test/db/pygit2/lib.py
blob: 356df9dcb1b0385691a3c2c2dca807fc2824016d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"""pygit2 specific utilities, as well as all the default ones"""

from git.test.lib import (
							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)

#}END decorators

#{ MetaClasses

class Pygit2RequiredMetaMixin(InheritedTestMethodsOverrideWrapperMetaClsAutoMixin):
	decorator = [needs_pygit2_or_skip]

#} END metaclasses