I am having some difficulties with exception handling in Python 3. In both Python 2.7 and 3.8, I have this snippet that gives you an idea of how I handle errors/exceptions:
## 
def tearDown(self):
  type_except, value, traceback = sys.exc_info()
  print("This is the exception type:", type_except)
  if not type_except:
    self.info("This was successful")
  elif type_except is self.failureException:
    self.warning(self.failure_message(type_except, value, tb))
    self.info("This failed")
  else:
    self.error(self.error_message(type_except, value, tb))
    self.info("This resulted in an ERROR")
In Python 2, everything works as expected, and when I have an exception, I get the error message, and I get this when I print what type_except is:
This is the exception type:
<type 'exceptions.AssertionError'>
In Python 3, when running the same test, that fails for the same reason, I get a tuple of Nones in sys.exc_info() instead. Thus, my failed tests pass.
Python 3:
This is the exception type: None
Does anyone know why this might be happening? I looked at the definitions of sys.exc_info() for both 2.7 and 3.8, but they seem the same.
--
More information: The test is as follows:
def test1_simpleLoad(self):
        '''Perform a simple load from a xxx server'''
        try:
            # Create session, connects to websocket, loads a wordset
            # Load wordset
            #compares expected response 
        finally:
            self._websocket.cleanup()
At the end of every test, the tearDown class is called, which was the code provided above ^