class_docstr: Unit tests for the nupic.support.decorators module.
class_docstr_tok: ["Unit","tests","for","the","nupic.support.decorators","module","."]
code: def testLogExceptionsWithSystemExitExceptionAndDefaultLogger(self):
      loggerMock = Mock(spec_set=decorators.logging.getLogger())
      with patch.object(
          decorators.logging,
          "getLogger",
          autospec=True,
          return_value=loggerMock,
      ):
          # SystemExit is based on BaseException, so we want to make sure that
          # those are handled properly, too
          inputArgs = (1, 2, 3)
          inputKwargs = dict(a="A", b="B", c="C")
  
          @decorators.logExceptions()
          def doSomething(*args, **kwargs):
              self.assertEqual(args, inputArgs)
              self.assertEqual(kwargs, inputKwargs)
  
              raise SystemExit()
  
          with self.assertRaises(SystemExit):
              doSomething(*inputArgs, **inputKwargs)
  
          self.assertEqual(loggerMock.exception.call_count, 1)
          self.assertIn(
              "Unhandled exception %r from %r. Caller stack:\n%s",
              loggerMock.exception.call_args[0][0],
          )
  
imports: from mock import patch, call, Mock
  from nupic.support.unittesthelpers.testcasebase import unittest
  from nupic.support import decorators
label_desc: Use image node_id 4 for calling the LogExceptionsTestCase obj's underlying member method code with example usage: obj.testLogExceptionsWithSystemExitExceptionAndDefaultLogger() without return types