# Path: taipan/objective/base.py
# class Object(object):
#     """Universal base class for objects.
# 
#     Inheriting from this class rather than the standard :class:`object`
#     will grant access to additional object-oriented features.
#     """
# 
# Path: taipan/functional/functions.py
# def const(k):
#     """Creates a function that always returns the same value.
# 
#     :param k: Value that resulting function will always return
# 
#     :return: Function that always returns ``k``,
#              regardless of what arguments, if any, were passed to it
#     """
#     return lambda *args, **kwargs: k
# 
# Path: tests/test_objective/test_base.py
# class _UniversalBaseClass(TestCase):
# 
#     @contextmanager
#     def _assertRaisesFinalInheritanceException(self, base):
#         with self.assertRaises(__unit__.ClassError) as r:
#             yield r
# 
#         msg = str(r.exception)
#         self.assertIn("cannot inherit", msg)
#         self.assertIn(base.__name__, msg)
# 
#     @contextmanager
#     def _assertRaisesUnnecessaryOverrideException(self):
#         with self.assertRaises(__unit__.ClassError) as r:
#             yield r
#         self.assertIn("unnecessary", str(r.exception))
# 
#     @contextmanager
#     def _assertRaisesMissingOverrideException(self):
#         with self.assertRaises(__unit__.ClassError) as r:
#             yield r
#         self.assertIn("must be marked", str(r.exception))
# 
#     @contextmanager
#     def _assertRaisesIncorrectOverrideBase(self, given, correct):
#         with self.assertRaises(__unit__.ClassError) as r:
#             yield r
# 
#         msg = str(r.exception)
#         self.assertIn("incorrect override base", msg)
# 
#         # a trick for semi-robust assertion on "expected X, got Y" message,
#         # insofar as it's not reliant on exact wording, just order of X & Y
#         self.assertLess(msg.find(correct.__name__), msg.find(given.__name__),
#                         msg="override bases: %r (correct) and %r (given) "
#                             "not found in error message: %s" % (
#                                 correct, given, msg))
# 
#     @contextmanager
#     def _assertRaisesOverrideFinalException(self):
#         with self.assertRaises(__unit__.ClassError) as r:
#             yield r
# 
#         msg = str(r.exception)
#         self.assertIn("final", msg)
#         self.assertIn("illegal", msg)
# 
#     @contextmanager
#     def _assertRaisesHideFinalException(self):
#         with self.assertRaises(__unit__.ClassError) as r:
#             yield r
# 
#         msg = str(r.exception)
#         self.assertIn("final", msg)
#         self.assertIn("hiding", msg)


import abc
import taipan.objective.modifiers as __unit__
from taipan.objective.base import Object
from taipan.functional.functions import const
from tests.test_objective.test_base import _UniversalBaseClass
        self._assertIsABC(Foo)
        self._assertCantInstantiate(Foo)

    def test_class__with_abstract_property(self):
        @__unit__.abstract
        class Foo(object):
            @__unit__.abstract.property
            def foo(self):
                pass

        self._assertIsABC(Foo)
        self._assertCantInstantiate(Foo)

    def test_inheritance__without_override(self):
        Foo = self._create_abstract_method_class()
        class Bar(Foo):
            pass

        self._assertCantInstantiate(Bar)

    def test_inheritance__with_override(self):
        Foo = self._create_abstract_method_class()
        class Bar(Foo):
            def foo(self):
                pass

        Bar().foo()

    def test_inheritance__with_override__and_super_call(self):
        retval = 42

# Path: taipan/objective/base.py
# class Object(object):
#     """Universal base class for objects.
# 
#     Inheriting from this class rather than the standard :class:`object`
#     will grant access to additional object-oriented features.
#     """
# 
# Path: taipan/functional/functions.py
# def const(k):
#     """Creates a function that always returns the same value.
# 
#     :param k: Value that resulting function will always return
# 
#     :return: Function that always returns ``k``,
#              regardless of what arguments, if any, were passed to it
#     """
#     return lambda *args, **kwargs: k
# 
# Path: tests/test_objective/test_base.py
# class _UniversalBaseClass(TestCase):
# 
#     @contextmanager
#     def _assertRaisesFinalInheritanceException(self, base):
#         with self.assertRaises(__unit__.ClassError) as r:
#             yield r
# 
#         msg = str(r.exception)
#         self.assertIn("cannot inherit", msg)
#         self.assertIn(base.__name__, msg)
# 
#     @contextmanager
#     def _assertRaisesUnnecessaryOverrideException(self):
#         with self.assertRaises(__unit__.ClassError) as r:
#             yield r
#         self.assertIn("unnecessary", str(r.exception))
# 
#     @contextmanager
#     def _assertRaisesMissingOverrideException(self):
#         with self.assertRaises(__unit__.ClassError) as r:
#             yield r
#         self.assertIn("must be marked", str(r.exception))
# 
#     @contextmanager
#     def _assertRaisesIncorrectOverrideBase(self, given, correct):
#         with self.assertRaises(__unit__.ClassError) as r:
#             yield r
# 
#         msg = str(r.exception)
#         self.assertIn("incorrect override base", msg)
# 
#         # a trick for semi-robust assertion on "expected X, got Y" message,
#         # insofar as it's not reliant on exact wording, just order of X & Y
#         self.assertLess(msg.find(correct.__name__), msg.find(given.__name__),
#                         msg="override bases: %r (correct) and %r (given) "
#                             "not found in error message: %s" % (
#                                 correct, given, msg))
# 
#     @contextmanager
#     def _assertRaisesOverrideFinalException(self):
#         with self.assertRaises(__unit__.ClassError) as r:
#             yield r
# 
#         msg = str(r.exception)
#         self.assertIn("final", msg)
#         self.assertIn("illegal", msg)
# 
#     @contextmanager
#     def _assertRaisesHideFinalException(self):
#         with self.assertRaises(__unit__.ClassError) as r:
#             yield r
# 
#         msg = str(r.exception)
#         self.assertIn("final", msg)
#         self.assertIn("hiding", msg)


# Path: tests/test_objective/test_modifiers.py
import abc
import taipan.objective.modifiers as __unit__
from taipan.objective.base import Object
from taipan.functional.functions import const
from tests.test_objective.test_base import _UniversalBaseClass

        self._assertIsABC(Foo)
        self._assertCantInstantiate(Foo)

    def test_class__with_abstract_property(self):
        @__unit__.abstract
        class Foo(object):
            @__unit__.abstract.property
            def foo(self):
                pass

        self._assertIsABC(Foo)
        self._assertCantInstantiate(Foo)

    def test_inheritance__without_override(self):
        Foo = self._create_abstract_method_class()
        class Bar(Foo):
            pass

        self._assertCantInstantiate(Bar)

    def test_inheritance__with_override(self):
        Foo = self._create_abstract_method_class()
        class Bar(Foo):
            def foo(self):
                pass

        Bar().foo()

    def test_inheritance__with_override__and_super_call(self):
        retval = 42

        Foo = self._create_abstract_method_class(method=const(retval))