<s> __revision__ = "<STR_LIT>" <EOL> import sys <EOL> import unittest <EOL> import SCons . Errors <EOL> class ErrorsTestCase ( unittest . TestCase ) : <EOL> def test_BuildError ( self ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> raise SCons . Errors . BuildError ( <EOL> errstr = "<STR_LIT:foo>" , status = <NUM_LIT> , filename = "<STR_LIT:file>" , exc_info = ( <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> ) , <EOL> node = "<STR_LIT:n>" , executor = "<STR_LIT:e>" , action = "<STR_LIT:a>" , command = "<STR_LIT:c>" ) <EOL> except SCons . Errors . BuildError , e : <EOL> assert e . errstr == "<STR_LIT:foo>" <EOL> assert e . status == <NUM_LIT> <EOL> assert e . exitstatus == <NUM_LIT:2> , e . exitstatus <EOL> assert e . filename == "<STR_LIT:file>" <EOL> assert e . exc_info == ( <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> ) <EOL> assert e . node == "<STR_LIT:n>" <EOL> assert e . executor == "<STR_LIT:e>" <EOL> assert e . action == "<STR_LIT:a>" <EOL> assert e . command == "<STR_LIT:c>" <EOL> try : <EOL> raise SCons . Errors . BuildError ( "<STR_LIT:n>" , "<STR_LIT:foo>" , <NUM_LIT> , <NUM_LIT:3> , "<STR_LIT:file>" , <EOL> "<STR_LIT:e>" , "<STR_LIT:a>" , "<STR_LIT:c>" , ( <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> ) ) <EOL> except SCons . Errors . BuildError , e : <EOL> assert e . errstr == "<STR_LIT:foo>" , e . errstr <EOL> assert e . status == <NUM_LIT> , e . status <EOL> assert e . exitstatus == <NUM_LIT:3> , e . exitstatus <EOL> assert e . filename == "<STR_LIT:file>" , e . filename <EOL> assert e . exc_info == ( <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> ) , e . exc_info <EOL> assert e . node == "<STR_LIT:n>" <EOL> assert e . executor == "<STR_LIT:e>" <EOL> assert e . action == "<STR_LIT:a>" <EOL> assert e . command == "<STR_LIT:c>" <EOL> try : <EOL> raise SCons . Errors . BuildError ( ) <EOL> except SCons . Errors . BuildError , e : <EOL> assert e . errstr == "<STR_LIT>" <EOL> assert e . status == <NUM_LIT:2> <EOL> assert e . exitstatus == <NUM_LIT:2> <EOL> assert e . filename == None <EOL> assert e . exc_info == ( None , None , None ) <EOL> assert e . node == None <EOL> assert e . executor == None <EOL> assert e . action == None <EOL> assert e . command == None <EOL> def test_InternalError ( self ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> raise SCons . Errors . InternalError , "<STR_LIT>" <EOL> except SCons . Errors . InternalError , e : <EOL> assert e . args == ( "<STR_LIT>" , ) <EOL> def test_UserError ( self ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> raise SCons . Errors . UserError , "<STR_LIT>" <EOL> except SCons . Errors . UserError , e : <EOL> assert e . args == ( "<STR_LIT>" , ) <EOL> def test_ExplicitExit ( self ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> raise SCons . Errors . ExplicitExit , "<STR_LIT>" <EOL> except SCons . Errors . ExplicitExit , e : <EOL> assert e . node == "<STR_LIT>" <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> suite = unittest . makeSuite ( ErrorsTestCase , '<STR_LIT>' ) <EOL> if not unittest . TextTestRunner ( ) . run ( suite ) . wasSuccessful ( ) : <EOL> sys . exit ( <NUM_LIT:1> ) </s>
