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