# 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 embed, IncompatibleSignatures
from sigtools.support import s
from sigtools.tests.util import Fixtures

    add_kwo_pos = '<b>, *, a', {1: 'a', 2: 'b'}, ['*args, a, **kwargs', '<b>']
    add_kwo_pok = 'b, *, a', {1: 'a', 2: 'b'}, ['*args, a, **kwargs', 'b']
    add_kwo_kwo = '*, a, b', {1: 'a', 2: 'b'}, ['*args, a, **kwargs', '*, b']

    conv_pok_pos = '<a>', {2: 'a'}, ['*args', 'a']
    conv_pok_kwo = '*, a', {2: 'a'}, ['**kwargs', 'a']

    three = (
        'a, b, c', {1: 'a', 2: 'b', 3: 'c'},
        ['a, *args, **kwargs', 'b, *args, **kwargs', 'c'])

    dont_use_varargs = (
        'a, *p, b', {1: 'ap', 2: 'b'}, ['a, *p, **k', 'b'], False)
    dont_use_varkwargs = (
        'a, b, /, **k', {1: 'ak', 2: 'b'}, ['a, *p, **k', 'b'], True, False)
    dont_use_either_empty = (
        'a, *p, **k', {1: 'apk'}, ['a, *p, **k', ''], False, False)

    outer_default = (
        'a, b, c, d, e, f',
        {1: 'abc', 2: 'def'}, ['a, b, c=0, *args, **kwargs', 'd, e, f'])
    outer_default_pos = (
        'a, b, c, /, d, e, f',
        {1: 'abc', 2: 'def'}, ['a, b, c=0, /, *args, **kwargs', 'd, e, f'])
    outer_default_inner_pos = (
        'a, b, c, d, /, e, f',
        {1: 'abc', 2: 'def'}, ['a, b, c=0, /, *args, **kwargs', 'd, /, e, f'])



# 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_embed.py
from sigtools.signatures import embed, IncompatibleSignatures
from sigtools.support import s
from sigtools.tests.util import Fixtures


    add_kwo_pos = '<b>, *, a', {1: 'a', 2: 'b'}, ['*args, a, **kwargs', '<b>']
    add_kwo_pok = 'b, *, a', {1: 'a', 2: 'b'}, ['*args, a, **kwargs', 'b']
    add_kwo_kwo = '*, a, b', {1: 'a', 2: 'b'}, ['*args, a, **kwargs', '*, b']

    conv_pok_pos = '<a>', {2: 'a'}, ['*args', 'a']
    conv_pok_kwo = '*, a', {2: 'a'}, ['**kwargs', 'a']

    three = (
        'a, b, c', {1: 'a', 2: 'b', 3: 'c'},
        ['a, *args, **kwargs', 'b, *args, **kwargs', 'c'])

    dont_use_varargs = (
        'a, *p, b', {1: 'ap', 2: 'b'}, ['a, *p, **k', 'b'], False)
    dont_use_varkwargs = (
        'a, b, /, **k', {1: 'ak', 2: 'b'}, ['a, *p, **k', 'b'], True, False)
    dont_use_either_empty = (
        'a, *p, **k', {1: 'apk'}, ['a, *p, **k', ''], False, False)

    outer_default = (
        'a, b, c, d, e, f',
        {1: 'abc', 2: 'def'}, ['a, b, c=0, *args, **kwargs', 'd, e, f'])
    outer_default_pos = (
        'a, b, c, /, d, e, f',
        {1: 'abc', 2: 'def'}, ['a, b, c=0, /, *args, **kwargs', 'd, e, f'])
    outer_default_inner_pos = (
        'a, b, c, d, /, e, f',
        {1: 'abc', 2: 'def'}, ['a, b, c=0, /, *args, **kwargs', 'd, /, e, f'])



class EmbedRaisesTests(Fixtures):