'Modified test setup that syncs with ipython namespace'

def setUp(self):

    if isinstance(self._dt_test.examples[0], IPExample):
        self.user_ns_orig = {}
        self.user_ns_orig.update(_ip.user_ns)
        _ip.user_ns.update(self._dt_test.globs)
        _ip.user_ns.pop('_', None)
        _ip.user_ns['__builtins__'] = builtin_mod
        self._dt_test.globs = _ip.user_ns
    super(DocTestCase, self).setUp()
