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

Method testSearchPathAccessor

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

Source from the content-addressed store, hash-verified

96 self.assertRaises( RuntimeError, l.setDefaultVersion, os.path.join( "maths", "multiply" ), 10 )
97
98 def testSearchPathAccessor( self ) :
99
100 l = IECore.ClassLoader( IECore.SearchPath( os.path.join( "test", "IECore", "ops" ) ) )
101 self.assertEqual( l.searchPath(), IECore.SearchPath( os.path.join( "test", "IECore", "ops" ) ) )
102
103 # check a copy is returned so it can't be modified in place
104 s = l.searchPath()
105 s.paths = [ "a", "b", "c" ]
106 self.assertEqual( l.searchPath(), IECore.SearchPath( os.path.join( "test", "IECore", "ops" ) ) )
107
108if __name__ == "__main__":
109 unittest.main()

Callers

nothing calls this directly

Calls 3

searchPathMethod · 0.95
SearchPathMethod · 0.80
joinMethod · 0.80

Tested by

no test coverage detected