# Path: sigtools/signatures.py

# 
# Path: sigtools/support.py
# def s(*args, **kwargs):
#     """Creates a signature from the given string representation of one.
# 
#     .. warning::
#         The contents of the arguments are eventually passed to `exec`.
#         Do not use with untrusted input.
# 
#     ::
# 
#         >>> from sigtools.support import s
#         >>> sig = s('a, b=2, *args, c:"annotation", **kwargs')
#         >>> sig
#         <inspect.Signature object at 0x7f15e6055550>
#         >>> print(sig)
#         (a, b=2, *args, c:'annotation', **kwargs)
#     """
#     return specifiers.signature(f(*args, **kwargs))
# 
# Path: sigtools/tests/util.py
# def conv_first_posarg(sig):
# def func_to_name(func):
# def transform_exp_sources(d, subject=None):
# def transform_real_sources(d):
#     def assertSigsEqual(self, found, expected, *args, **kwargs):
#     def assertSourcesEqual(self, found, expected, func=None, depth_order=False):
#     def downgrade_sig(self, sig):
# class SignatureTests(unittest.TestCase):


from sigtools.signatures import forwards
from sigtools.support import s
from sigtools.tests.util import Fixtures
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.





class ForwardsTests(Fixtures):
    def _test(self, exp_sig, exp_src, outer, inner,
                    num_args=0, named_args=(),
                    hide_args=False, hide_kwargs=False,
                    use_varargs=True, use_varkwargs=True,
                    partial=False):
        outer_sig = s(outer, name='o')
        inner_sig = s(inner, name='i')

        sig = forwards(
                    outer_sig, inner_sig,
                    num_args, *named_args,
                    hide_args=hide_args, hide_kwargs=hide_kwargs,
                    use_varargs=use_varargs, use_varkwargs=use_varkwargs,
                    partial=partial)
        self.assertSigsEqual(sig, s(exp_sig))
        self.assertSourcesEqual(sig.sources, {
                'o': exp_src[0], 'i': exp_src[1],
                '+depths': ['o', 'i']})

        outer_sig = self.downgrade_sig(outer_sig)
        inner_sig = self.downgrade_sig(inner_sig)

# Path: sigtools/signatures.py

# 
# Path: sigtools/support.py
# def s(*args, **kwargs):
#     """Creates a signature from the given string representation of one.
# 
#     .. warning::
#         The contents of the arguments are eventually passed to `exec`.
#         Do not use with untrusted input.
# 
#     ::
# 
#         >>> from sigtools.support import s
#         >>> sig = s('a, b=2, *args, c:"annotation", **kwargs')
#         >>> sig
#         <inspect.Signature object at 0x7f15e6055550>
#         >>> print(sig)
#         (a, b=2, *args, c:'annotation', **kwargs)
#     """
#     return specifiers.signature(f(*args, **kwargs))
# 
# Path: sigtools/tests/util.py
# def conv_first_posarg(sig):
# def func_to_name(func):
# def transform_exp_sources(d, subject=None):
# def transform_real_sources(d):
#     def assertSigsEqual(self, found, expected, *args, **kwargs):
#     def assertSourcesEqual(self, found, expected, func=None, depth_order=False):
#     def downgrade_sig(self, sig):
# class SignatureTests(unittest.TestCase):


# Path: sigtools/tests/test_forwards.py
from sigtools.signatures import forwards
from sigtools.support import s
from sigtools.tests.util import Fixtures

# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.





class ForwardsTests(Fixtures):
    def _test(self, exp_sig, exp_src, outer, inner,
                    num_args=0, named_args=(),
                    hide_args=False, hide_kwargs=False,
                    use_varargs=True, use_varkwargs=True,
                    partial=False):
        outer_sig = s(outer, name='o')
        inner_sig = s(inner, name='i')

        sig = forwards(
                    outer_sig, inner_sig,
                    num_args, *named_args,
                    hide_args=hide_args, hide_kwargs=hide_kwargs,
                    use_varargs=use_varargs, use_varkwargs=use_varkwargs,
                    partial=partial)
        self.assertSigsEqual(sig, s(exp_sig))
        self.assertSourcesEqual(sig.sources, {
                'o': exp_src[0], 'i': exp_src[1],
                '+depths': ['o', 'i']})

        outer_sig = self.downgrade_sig(outer_sig)
        inner_sig = self.downgrade_sig(inner_sig)

        sig = forwards(