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

Method testPreprocessing

test/IECoreGL/ShaderLoaderTest.py:64–75  ·  view source on GitHub ↗
( self )

Source from the content-addressed store, hash-verified

62 self.assertTrue( IECoreGL.ShaderLoader.defaultShaderLoader().isSame( IECoreGL.ShaderLoader.defaultShaderLoader() ) )
63
64 def testPreprocessing( self ) :
65
66 sp = IECore.SearchPath( os.path.join( os.path.dirname( __file__ ), "shaders" ) )
67 psp = IECore.SearchPath( os.path.join( os.path.dirname( __file__ ), "shaders", "include" ) )
68
69 # this should work
70 l = IECoreGL.ShaderLoader( sp, psp )
71 s = l.load( "failWithoutPreprocessing" )
72
73 # but turning off preprocessing should cause a throw
74 l = IECoreGL.ShaderLoader( sp )
75 self.assertRaises( RuntimeError, l.load, "failWithoutPreprocessing" )
76
77 def testPreprocessingAllowsVersionAndExtension( self ) :
78

Callers

nothing calls this directly

Calls 4

loadMethod · 0.95
SearchPathMethod · 0.80
joinMethod · 0.80
ShaderLoaderMethod · 0.80

Tested by

no test coverage detected