'Test that object\'s __del__ methods are called on exit.'

def test_obj_del(self):

    if (sys.platform == 'win32'):
        try:
            import win32api
        except ImportError:
            raise SkipTest('Test    requires    pywin32')
    src = "class    A(object):\n                def    __del__(self):\n                                print    'object    A    deleted'\na    =    A()\n"
    self.mktmp(py3compat.doctest_refactor_print(src))
    if dec.module_not_available('sqlite3'):
        err = 'WARNING:    IPython    History    requires    SQLite,    your    history    will    not    be    saved\n'
    else:
        err = None
    tt.ipexec_validate(self.fname, 'object    A    deleted', err)
