'Prepare a mocked ``ipdb`` module with a mocked
``launch_ipdb_on_exception`` function, which is used in
``coala --debug`` mode to open and ``ipdb>`` prompt when unexpected
exceptions occur'

def ipdbMock(self):

    mock = MagicMock()
    def __exit__(self, *exc_info):
        '\n                                                Make    mocked    ``ipdb.launch_ipdb_on_exception()``    context    just\n                                                reraise    the    exception.\n                                                '
        raise
    mock.launch_ipdb_on_exception.__enter__ = None
    mock.launch_ipdb_on_exception.__exit__ = __exit__
    return mock
