Beispiel #1
0
from pdk.test.utest_util import Test

from pdk.exceptions import InputError
from pdk.command_base import Commands, CommandInvoker, HelpInvoker, \
     CommandArgs, HelpMultiInvoker, DirectCommand, gescape, gbold, \
     gitalic, make_invokable, CommandAlias

__revision__ = "$Progeny$"


def dummy_function1():
    '''test doc 1'''
    pass


dummy_function1 = make_invokable(dummy_function1)


def dummy_function2():
    '''test doc 2'''
    pass


dummy_function2 = make_invokable(dummy_function2)


def dummy_function3():
    '''test doc 3'''
    pass

Beispiel #2
0
                # note unknown prefixes
                arbiter.note_problem(blob_id, ('md5:', 'sha-1:'),
                                     'unknown prefix')
        prefixes.sort()
        if prefixes != ['md5', 'sha-1']:
            digests = (md5_digest.hexdigest(), sha1_digest.hexdigest())
            arbiter.note_problem(tuple(blob_ids), digests,
                                 'not hard linked properly')

    arbiter.note_leftovers()

    if note_problem.called:
        raise IntegrityFault, "Audit detected fault(s)"


audit = make_invokable(audit)


def string_together(fields, separator):
    """Stringify fields and join them with separator.

    if not bool(field): stringified field becomes ''.
    """
    string_fields = [f and str(f) or '' for f in fields]
    joined_string = separator.join(string_fields)
    return joined_string


class Arbiter(object):
    """Match predictions with warrants.
Beispiel #3
0
                    blob_id
                    , ('md5:', 'sha-1:')
                    , 'unknown prefix'
                    )
        prefixes.sort()
        if prefixes != ['md5', 'sha-1']:
            digests = (md5_digest.hexdigest(), sha1_digest.hexdigest())
            arbiter.note_problem(tuple(blob_ids), digests,
                                 'not hard linked properly')

    arbiter.note_leftovers()

    if note_problem.called:
        raise IntegrityFault, "Audit detected fault(s)"

audit = make_invokable(audit)

def string_together(fields, separator):
    """Stringify fields and join them with separator.

    if not bool(field): stringified field becomes ''.
    """
    string_fields = [ f and str(f) or '' for f in fields ]
    joined_string = separator.join(string_fields)
    return joined_string

class Arbiter(object):
    """Match predictions with warrants.

    Predictions do not neccessarily have to precede warrants.
Beispiel #4
0
#   Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

from pdk.test.utest_util import Test

from pdk.exceptions import InputError
from pdk.command_base import Commands, CommandInvoker, HelpInvoker, \
     CommandArgs, HelpMultiInvoker, DirectCommand, gescape, gbold, \
     gitalic, make_invokable, CommandAlias

__revision__ = "$Progeny$"

def dummy_function1():
    '''test doc 1'''
    pass

dummy_function1 = make_invokable(dummy_function1)

def dummy_function2():
    '''test doc 2'''
    pass

dummy_function2 = make_invokable(dummy_function2)

def dummy_function3():
    '''test doc 3'''
    pass

dummy_function3 = make_invokable(dummy_function3)

local_module = __name__