summaryrefslogtreecommitdiff
path: root/git/test/db/dulwich/lib.py
blob: bd6a056419d5a57dcdad644f5b536b436d01057d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""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