Example #1
0
 def test_converter(self):
     try:
         my_exceptions.check_preconditions(True)
     except my_exceptions.application_error, err:
         app_name = my_exceptions.get_application_name(err)
         self.failUnless("my_exceptions module" == app_name)
Example #2
0
 def test_base_error(self):
     try:
         my_exceptions.check_preconditions(True)
     except Exception, err:
         self.failUnless(str(err) == "xyz")
Example #3
0
 def test_redirection(self):
     try:
         my_exceptions.check_preconditions(True)
     except Exception, err:
         self.failUnless(err.application_name() == "my_exceptions module")
Example #4
0
 def test_function_call(self):
     my_exceptions.check_preconditions(False)
Example #5
0
 def test_concrete_error(self):
     try:
         my_exceptions.check_preconditions(True)
     except my_exceptions.application_error, err:
         self.failUnless(str(err) == "xyz")
Example #6
0
 def test_converter( self ):
     try:
         my_exceptions.check_preconditions( True )
     except my_exceptions.application_error, err:
         app_name = my_exceptions.get_application_name( err )
         self.failUnless( "my_exceptions module" == app_name )
Example #7
0
 def test_redirection( self ):
     try:
         my_exceptions.check_preconditions( True )
     except Exception, err:
         self.failUnless( err.application_name() == "my_exceptions module" )
Example #8
0
 def test_base_error( self ):
     try:
         my_exceptions.check_preconditions( True )
     except Exception, err:
         self.failUnless( str( err ) == "xyz" )
Example #9
0
 def test_concrete_error( self ):
     try:
         my_exceptions.check_preconditions( True )
     except my_exceptions.application_error, err:
         self.failUnless( str( err ) == "xyz" )
Example #10
0
 def test_function_call( self ):
     my_exceptions.check_preconditions( False )