def test_on_off(self):
		tracestack.on()
		self.assertIsNot(sys.excepthook, sys.__excepthook__)
		self.assertTrue(isinstance(sys.excepthook, 
								   tracestack.handler.ExceptionHandler))
		tracestack.off()
		self.assertIs(sys.excepthook, sys.__excepthook__)
Beispiel #2
0
 def test_on_off(self):
     tracestack.on()
     self.assertIsNot(sys.excepthook, sys.__excepthook__)
     self.assertTrue(
         isinstance(sys.excepthook, tracestack.handler.ExceptionHandler))
     tracestack.off()
     self.assertIs(sys.excepthook, sys.__excepthook__)
Beispiel #3
0
 def wrapper(*args, **kwargs):
     tracestack.on(*handler_args, **handler_kwargs)
     result = func(*args, **kwargs)
     tracestack.off()
     return result
Beispiel #4
0
 def wrapper(*args, **kwargs):
     tracestack.on(*handler_args, **handler_kwargs)
     result = func(*args, **kwargs)
     tracestack.off()
     return result