# Path: shpkpr/exceptions.py
# class ShpkprException(ClickException):
# def _args_from_exception(exception):
# def rewrap(exceptions_to_catch, exception_to_rewrap_with=ShpkprException):
#     def real_decorator(function):
#         def wrapper(*args, **kwargs):


import pytest
from shpkpr import exceptions
    """Dummy func for testing the exceptions.rewrap decorator
    """
    return 'something'


@exceptions.rewrap(ValueError)
def _this_raises_a_key_error():
    """Dummy func for testing the exceptions.rewrap decorator
    """
    return {}['non-existant-key']


@exceptions.rewrap(ValueError)
def _this_raises_a_value_error():
    """Dummy func for testing the exceptions.rewrap decorator
    """
    return int("banana for scale")


@exceptions.rewrap(ValueError, KeyError)
def _this_also_raises_a_value_error():
    """Dummy func for testing the exceptions.rewrap decorator
    """
    return int("I suggest you drop it, Mr. Data")


class ExceptionRaiser(object):
    """Dummy class for testing the exceptions.rewrap decorator
    """


# Path: shpkpr/exceptions.py
# class ShpkprException(ClickException):
# def _args_from_exception(exception):
# def rewrap(exceptions_to_catch, exception_to_rewrap_with=ShpkprException):
#     def real_decorator(function):
#         def wrapper(*args, **kwargs):


# Path: tests/test_exceptions.py
import pytest
from shpkpr import exceptions

    """Dummy func for testing the exceptions.rewrap decorator
    """
    return 'something'


@exceptions.rewrap(ValueError)
def _this_raises_a_key_error():
    """Dummy func for testing the exceptions.rewrap decorator
    """
    return {}['non-existant-key']


@exceptions.rewrap(ValueError)
def _this_raises_a_value_error():
    """Dummy func for testing the exceptions.rewrap decorator
    """
    return int("banana for scale")


@exceptions.rewrap(ValueError, KeyError)
def _this_also_raises_a_value_error():
    """Dummy func for testing the exceptions.rewrap decorator
    """
    return int("I suggest you drop it, Mr. Data")


class ExceptionRaiser(object):
    """Dummy class for testing the exceptions.rewrap decorator
    """


    @exceptions.rewrap(KeyError)