( self )
| 68 | self.assertEqual( config["a"], 2 ) |
| 69 | |
| 70 | def testIgnoreExceptions( self ) : |
| 71 | |
| 72 | config = {} |
| 73 | |
| 74 | m = IECore.CapturingMessageHandler() |
| 75 | with m : |
| 76 | |
| 77 | IECore.loadConfig( |
| 78 | |
| 79 | IECore.SearchPath( [ |
| 80 | os.path.join( os.path.dirname( __file__ ), "config", "orderOne" ), |
| 81 | os.path.join( os.path.dirname( __file__ ), "config", "exceptions" ), |
| 82 | ] ), |
| 83 | |
| 84 | contextDict = { "config" : config }, |
| 85 | raiseExceptions = False |
| 86 | |
| 87 | ) |
| 88 | |
| 89 | errors = [ msg for msg in m.messages if msg.level == IECore.Msg.Level.Error ] |
| 90 | self.assertEqual( len( errors ), 1 ) |
| 91 | self.assertEqual( errors[0].level, IECore.Msg.Level.Error ) |
| 92 | self.assertTrue( "I am a very naughty boy" in errors[0].message ) |
| 93 | |
| 94 | self.assertEqual( config["a"], 1 ) |
| 95 | |
| 96 | def testThrowExceptions( self ) : |
| 97 |
nothing calls this directly
no test coverage detected