Example #1
0
 def test_changed(self):
     """Test with changed sys.excepthook."""
     sys.excepthook = excepthook
     with utils.disabled_excepthook():
         assert sys.excepthook is not excepthook
         sys.excepthook = excepthook_2
     assert sys.excepthook is excepthook_2
Example #2
0
 def test_changed(self):
     """Test with changed sys.excepthook."""
     sys.excepthook = excepthook
     with utils.disabled_excepthook():
         assert sys.excepthook is not excepthook
         sys.excepthook = excepthook_2
     assert sys.excepthook is excepthook_2
Example #3
0
 def test_normal(self):
     """Test without changing sys.excepthook."""
     sys.excepthook = excepthook
     assert sys.excepthook is excepthook
     with utils.disabled_excepthook():
         assert sys.excepthook is not excepthook
     assert sys.excepthook is excepthook
Example #4
0
 def test_normal(self):
     """Test without changing sys.excepthook."""
     sys.excepthook = excepthook
     assert sys.excepthook is excepthook
     with utils.disabled_excepthook():
         assert sys.excepthook is not excepthook
     assert sys.excepthook is excepthook