Пример #1
0
 def test_already_set(self, ei):
     """
     Do nothing if exc_info is already set.
     """
     assert {
         "exc_info": ei
     } == dev.set_exc_info(None, "foo", {"exc_info": ei})
Пример #2
0
 def test_set_it(self):
     """
     Set exc_info to True if its not set and if the method name is
     exception.
     """
     assert {"exc_info": True} == dev.set_exc_info(None, "exception", {})
Пример #3
0
 def test_wrong_name(self):
     """
     Do nothing if name is not exception.
     """
     assert {} == dev.set_exc_info(None, "foo", {})