# Path: pywrap/testing.py
# @contextmanager
# def cython_extension_from(headers, modulename=None, config=Config(),
#                           assert_warn=None, warn_msg=None, incdirs=[],
#                           hide_errors=False, cleanup=True):
#     incdirs = full_paths(incdirs)
#     filenames = _write_cython_wrapper(full_paths(headers), modulename,
#                                       config, incdirs, assert_warn, warn_msg)
#     run_setup(SETUPPY_NAME, hide_errors)
#     try:
#         yield
#     finally:
#         if cleanup:
#             remove_files(filenames)


from pywrap.testing import cython_extension_from
from nose.tools import assert_equal
        from overloadmethod import A
        from overloadfunction import plus_one


def test_overloading_method_is_not_possible():
    with cython_extension_from(
            "overloadmethod.hpp", assert_warn=UserWarning,
            warn_msg="Method 'A.plusOne' is already defined"):
        a = A()
        assert_equal(a.plus_one(3.0), 4.0)


def test_overloading_function_is_not_possible():

# Path: pywrap/testing.py
# @contextmanager
# def cython_extension_from(headers, modulename=None, config=Config(),
#                           assert_warn=None, warn_msg=None, incdirs=[],
#                           hide_errors=False, cleanup=True):
#     incdirs = full_paths(incdirs)
#     filenames = _write_cython_wrapper(full_paths(headers), modulename,
#                                       config, incdirs, assert_warn, warn_msg)
#     run_setup(SETUPPY_NAME, hide_errors)
#     try:
#         yield
#     finally:
#         if cleanup:
#             remove_files(filenames)


# Path: test/test_overloading.py
from pywrap.testing import cython_extension_from
from nose.tools import assert_equal
        from overloadmethod import A
        from overloadfunction import plus_one



def test_overloading_method_is_not_possible():
    with cython_extension_from(
            "overloadmethod.hpp", assert_warn=UserWarning,
            warn_msg="Method 'A.plusOne' is already defined"):
        a = A()
        assert_equal(a.plus_one(3.0), 4.0)


def test_overloading_function_is_not_possible():

    with cython_extension_from(