# Path: sigtools/_util.py
# def get_funcsigs():
#     def __repr__(self):
# def noop(func):
# def qualname(obj):
#     def __init__(self, *args, **kwargs):
#             def cg(func, **kwargs):
#     def __get__(self, instance, owner):
# def safe_get(obj, instance, owner):
# def iter_call(obj):
# def get_introspectable(obj, forged=True, af_hint=True, partial=True):
# def get_ast(func):
# class _Unset(object):
# class OverrideableDataDesc(object):
# UNSET = _Unset()
# 
# 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):


import unittest
from sigtools._util import OrderedDict as od
from sigtools.support import s
from sigtools.tests import util as tutil
                {'+depths': {f1: 0, f2: 1},
                'a': [f1, f2], 'b': [f1], 'c': [f2]}),
            {'a': ['f1', 'f2'], 'b': ['f1'], 'c': ['f2'],
             '+depths': {'f1': 0, 'f2': 1}})


class SignatureTestsTests(tutil.SignatureTests):
    def test_sigs_equal(self):
        self.assertSigsEqual(s('one'), s('one'))
        self.assertSigsEqual(s('*, one'), s('*, one'))

        with self.assertRaises(AssertionError):
            self.assertSigsEqual(s('one'), s('two'))
        with self.assertRaises(AssertionError):
            self.assertSigsEqual(s('one'), s('*, one'))

    def test_sigs_equal_conv_first(self):
        self.assertSigsEqual(s('self, /, one'), s('self, one'),
                             conv_first_posarg=True)
        self.assertSigsEqual(s('self, one'), s('self, /, one'),
                             conv_first_posarg=True)
        self.assertSigsEqual(s('self, /, *, one'), s('self, *, one'),
                             conv_first_posarg=True)
        self.assertSigsEqual(s('self, *, one'), s('self, /, *, one'),
                             conv_first_posarg=True)

        with self.assertRaises(AssertionError):
            self.assertSigsEqual(s('self, /, one'), s('self, two'),
                                 conv_first_posarg=True)
        with self.assertRaises(AssertionError):

# Path: sigtools/_util.py
# def get_funcsigs():
#     def __repr__(self):
# def noop(func):
# def qualname(obj):
#     def __init__(self, *args, **kwargs):
#             def cg(func, **kwargs):
#     def __get__(self, instance, owner):
# def safe_get(obj, instance, owner):
# def iter_call(obj):
# def get_introspectable(obj, forged=True, af_hint=True, partial=True):
# def get_ast(func):
# class _Unset(object):
# class OverrideableDataDesc(object):
# UNSET = _Unset()
# 
# 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_testutil.py
import unittest
from sigtools._util import OrderedDict as od
from sigtools.support import s
from sigtools.tests import util as tutil

                {'+depths': {f1: 0, f2: 1},
                'a': [f1, f2], 'b': [f1], 'c': [f2]}),
            {'a': ['f1', 'f2'], 'b': ['f1'], 'c': ['f2'],
             '+depths': {'f1': 0, 'f2': 1}})


class SignatureTestsTests(tutil.SignatureTests):
    def test_sigs_equal(self):
        self.assertSigsEqual(s('one'), s('one'))
        self.assertSigsEqual(s('*, one'), s('*, one'))

        with self.assertRaises(AssertionError):
            self.assertSigsEqual(s('one'), s('two'))
        with self.assertRaises(AssertionError):
            self.assertSigsEqual(s('one'), s('*, one'))

    def test_sigs_equal_conv_first(self):
        self.assertSigsEqual(s('self, /, one'), s('self, one'),
                             conv_first_posarg=True)
        self.assertSigsEqual(s('self, one'), s('self, /, one'),
                             conv_first_posarg=True)
        self.assertSigsEqual(s('self, /, *, one'), s('self, *, one'),
                             conv_first_posarg=True)
        self.assertSigsEqual(s('self, *, one'), s('self, /, *, one'),
                             conv_first_posarg=True)

        with self.assertRaises(AssertionError):
            self.assertSigsEqual(s('self, /, one'), s('self, two'),
                                 conv_first_posarg=True)
        with self.assertRaises(AssertionError):

            self.assertSigsEqual(s('self, /, one'), s('self, *, one'),