Пример #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)
Пример #2
0
 def test_base_error(self):
     try:
         my_exceptions.check_preconditions(True)
     except Exception, err:
         self.failUnless(str(err) == "xyz")
Пример #3
0
 def test_redirection(self):
     try:
         my_exceptions.check_preconditions(True)
     except Exception, err:
         self.failUnless(err.application_name() == "my_exceptions module")
Пример #4
0
 def test_function_call(self):
     my_exceptions.check_preconditions(False)
Пример #5
0
 def test_concrete_error(self):
     try:
         my_exceptions.check_preconditions(True)
     except my_exceptions.application_error, err:
         self.failUnless(str(err) == "xyz")
Пример #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 )
Пример #7
0
 def test_redirection( self ):
     try:
         my_exceptions.check_preconditions( True )
     except Exception, err:
         self.failUnless( err.application_name() == "my_exceptions module" )
Пример #8
0
 def test_base_error( self ):
     try:
         my_exceptions.check_preconditions( True )
     except Exception, err:
         self.failUnless( str( err ) == "xyz" )
Пример #9
0
 def test_concrete_error( self ):
     try:
         my_exceptions.check_preconditions( True )
     except my_exceptions.application_error, err:
         self.failUnless( str( err ) == "xyz" )
Пример #10
0
 def test_function_call( self ):
     my_exceptions.check_preconditions( False )