# Path: taipan/collections/lists.py
# def head(list_):
#     """Returns head of a list, i.e. it's first element."""
#     ensure_sequence(list_)
#     return list_[0]
# 
# def tail(list_):
#     """Returns tail of a list (all elements without the first one)."""
#     ensure_sequence(list_)
#     if not list_:
#         raise ValueError("can't tail an empty list")
#     return list(list_[1:])
# 
# Path: taipan/testing/testcase.py
# class TestCase(_TestCase, AssertsMixin):
#     """Augmented test case class.
# 
#     Includes few additional, convenience assertion methods,
#     as well as the capability to use test stage decorators,
#     such as :func:`setUp` and :func:`tearDown`.
#     """
#     # Python 3 changes name of the following assert function,
#     # so we provide backward and forward synonyms for compatibility
#     if IS_PY3:
#         assertItemsEqual = _TestCase.assertCountEqual
#     else:
#         assertCountEqual = _TestCase.assertItemsEqual


import inspect
import re
import taipan.objective.methods as __unit__
from taipan.collections.lists import head, tail
from taipan.testing import TestCase
        class Foo(object):
            pass
        def foo(self):
            pass

        obj = Foo()
        obj.foo = foo
        __unit__.ensure_method(obj.foo)


class GetMethods(TestCase):
    """Tests for ``get_methods`` would be only a repetition of what is
    already verified by tests for ``is_method``, so we don't provide any.

    We ensure, however, that this fact doesn't suddenly cease to hold
    by maintaining few spots checks of the properties of ``get_methods``
    _implementation_.
    """
    FUNC = __unit__.get_methods
    CODE = FUNC.__code__

    def test_no_local_variables(self):
        # count the new locals introduced inside function's body, not args
        local_vars_count = self.CODE.co_nlocals - self.CODE.co_argcount
        self.assertZero(local_vars_count)

    def test_no_literal_constants(self):
        # make sure docstring is the only literal constant used in the code
        self.assertEquals(
            __unit__.get_methods.__doc__, head(self.CODE.co_consts))

# Path: taipan/collections/lists.py
# def head(list_):
#     """Returns head of a list, i.e. it's first element."""
#     ensure_sequence(list_)
#     return list_[0]
# 
# def tail(list_):
#     """Returns tail of a list (all elements without the first one)."""
#     ensure_sequence(list_)
#     if not list_:
#         raise ValueError("can't tail an empty list")
#     return list(list_[1:])
# 
# Path: taipan/testing/testcase.py
# class TestCase(_TestCase, AssertsMixin):
#     """Augmented test case class.
# 
#     Includes few additional, convenience assertion methods,
#     as well as the capability to use test stage decorators,
#     such as :func:`setUp` and :func:`tearDown`.
#     """
#     # Python 3 changes name of the following assert function,
#     # so we provide backward and forward synonyms for compatibility
#     if IS_PY3:
#         assertItemsEqual = _TestCase.assertCountEqual
#     else:
#         assertCountEqual = _TestCase.assertItemsEqual


# Path: tests/test_objective/test_methods.py
import inspect
import re
import taipan.objective.methods as __unit__
from taipan.collections.lists import head, tail
from taipan.testing import TestCase

        class Foo(object):
            pass
        def foo(self):
            pass

        obj = Foo()
        obj.foo = foo
        __unit__.ensure_method(obj.foo)


class GetMethods(TestCase):
    """Tests for ``get_methods`` would be only a repetition of what is
    already verified by tests for ``is_method``, so we don't provide any.

    We ensure, however, that this fact doesn't suddenly cease to hold
    by maintaining few spots checks of the properties of ``get_methods``
    _implementation_.
    """
    FUNC = __unit__.get_methods
    CODE = FUNC.__code__

    def test_no_local_variables(self):
        # count the new locals introduced inside function's body, not args
        local_vars_count = self.CODE.co_nlocals - self.CODE.co_argcount
        self.assertZero(local_vars_count)

    def test_no_literal_constants(self):
        # make sure docstring is the only literal constant used in the code
        self.assertEquals(
            __unit__.get_methods.__doc__, head(self.CODE.co_consts))

        self.assertEmpty(tail(self.CODE.co_consts))