Esempio n. 1
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__)
Esempio n. 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__)
Esempio n. 3
0
 def wrapper(*args, **kwargs):
     tracestack.on(*handler_args, **handler_kwargs)
     result = func(*args, **kwargs)
     tracestack.off()
     return result
Esempio n. 4
0
 def wrapper(*args, **kwargs):
     tracestack.on(*handler_args, **handler_kwargs)
     result = func(*args, **kwargs)
     tracestack.off()
     return result