def delhook():
    if verbose: print "Testing __del__ hook..."
    log = []
    class C(object):
        def __del__(self):
            log.append(1)
    c = C()
    vereq(log, [])
    del c
    extra_collect()
    vereq(log, [1])

    class D(object): pass
    d = D()
    try: del d[0]
    except __HOLE__: pass
    else: raise TestFailed, "invalid del() didn't raise TypeError"
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/test_descr.py/delhook