Exemple #1
0
 def test_object_initialization_CORBA_Exception(self):
     """ACSError initialized from CORBA Exception"""
     try:
         raise Exception("ACSError Test Exception")
     except Exception, e:
         cex = Err.pyExceptionToCORBA(e)
         er = Err.ACSError(0,0,exception=cex,create=0)
         self.assertEqual(er.errorTrace,cex.errorTrace)
Exemple #2
0
 def test_object_initialization_CORBA_Exception(self):
     """ACSError initialized from CORBA Exception"""
     try:
         raise Exception("ACSError Test Exception")
     except Exception, e:
         cex = Err.pyExceptionToCORBA(e)
         er = Err.ACSError(0, 0, exception=cex, create=0)
         self.assertEqual(er.errorTrace, cex.errorTrace)
Exemple #3
0
 def test_py_exception_to_corb_a(self):
     """pyExceptionToCORBA creates CORBA exception from Python exception"""
     try:
         raise Exception("ACSError Test Exception")
     except Exception, e:
         cex = Err.pyExceptionToCORBA(e)
         self.assertEqual(True, isinstance(cex, PythonExImpl))
         self.assertEqual(True, isinstance(cex.errorTrace, Err.ErrorTrace))
         self.assertEqual(7, cex.errorTrace.errorType)
         self.assertEqual(0, cex.errorTrace.errorCode)
Exemple #4
0
 def test_py_exception_to_corb_a(self):
     """pyExceptionToCORBA creates CORBA exception from Python exception"""
     try:
         raise Exception("ACSError Test Exception")
     except Exception, e:
         cex = Err.pyExceptionToCORBA(e)
         self.assertEqual(True, isinstance(cex, PythonExImpl))
         self.assertEqual(True, isinstance(cex.errorTrace, Err.ErrorTrace))
         self.assertEqual(7, cex.errorTrace.errorType)
         self.assertEqual(0, cex.errorTrace.errorCode)