MCPcopy Create free account
hub / github.com/ImageEngine/cortex / testExceptions

Method testExceptions

test/IECore/ClassLoader.py:90–96  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

88 c = l.load( os.path.join( "path.With.Dot", "multiply" ) )
89
90 def testExceptions( self ) :
91
92 l = IECore.ClassLoader( IECore.SearchPath( os.path.join( "test", "IECore", "ops" ) ) )
93 self.assertRaises( RuntimeError, l.getDefaultVersion, "thisOpDoesntExist" )
94 self.assertRaises( RuntimeError, l.setDefaultVersion, "thisOpDoesntExist", 1 )
95 self.assertRaises( TypeError, l.setDefaultVersion, os.path.join( "maths", "multiply" ), "iShouldBeAnInt" )
96 self.assertRaises( RuntimeError, l.setDefaultVersion, os.path.join( "maths", "multiply" ), 10 )
97
98 def testSearchPathAccessor( self ) :
99

Callers

nothing calls this directly

Calls 2

SearchPathMethod · 0.80
joinMethod · 0.80

Tested by

no test coverage detected