Ejemplo n.º 1
0
def test_deprecated_string_exception():
    w = warning_trapper()
    try:
        raise 'Error'
    except:
        pass
    m = w.finish()
    try:
        raise 'foo'
    except TypeError as e:
        print(e.message)
Ejemplo n.º 2
0
def test_deprecated_string_exception():
    w = warning_trapper()
    try:
        raise 'Error'
    except:
        pass
    m = w.finish()
    try:
        raise 'foo'
    except TypeError, e:
        print e.message
Ejemplo n.º 3
0
def test_disable():
    if is_cli or is_silverlight:
        from iptest.warning_util import warning_trapper
        w = warning_trapper()
        w.hook()
        gc.disable()
        m = w.finish()        
        AreEqual(m[0].message, 'IronPython has no support for disabling the GC')
    else:
        gc.disable()
        result = gc.isenabled()
        Assert(result == False,"enable Method can't set gc.isenabled as false.")
Ejemplo n.º 4
0
def test_disable():
    if is_cli or is_silverlight:
        from iptest.warning_util import warning_trapper
        w = warning_trapper()
        w.hook()
        gc.disable()
        m = w.finish()        
        AreEqual(m[0].message, 'IronPython has no support for disabling the GC')
    else:
        gc.disable()
        result = gc.isenabled()
        Assert(result == False,"enable Method can't set gc.isenabled as false.")