示例#1
0
文件: fabfile.py 项目: Nassty/excheck
def test_exception():
    import sys
    sys.path.insert(0, '.')
    import excatch
    excatch.bind()

    def test():
        def cb():
            1 / 0
        cb()
    test()
示例#2
0
文件: main.py 项目: Nassty/excheck
 def testUnbind(self):
     excatch.bind()
     excatch.unbind()
     assert excatch.sys.excepthook, excatch.sys.__excepthook__
示例#3
0
文件: main.py 项目: Nassty/excheck
 def testBind(self):
     old = excatch.Hook.custom_hook
     excatch.Hook.custom_hook = 'TEST'
     excatch.bind()
     assert excatch.sys.excepthook, 'TEST'
     excatch.Hook.custom_hook = old