def test_ShaderProperties(self): """ Test property correctness on the "TestShaderPropertiesNodeOSL" node. See shaderParserTestUtils TestShaderPropertiesNode method for detailed description of the test. """ URI = "TestShaderPropertiesNodeOSL.oso" sourceCode = "" metadata = {} blindData = "" discoveryResult = Ndr.NodeDiscoveryResult( "TestShaderPropertiesNodeOSL", # Identifier Ndr.Version(), # Version "TestShaderPropertiesNodeOSL", # Name "", # Family "oso", # Discovery type (extension) "OSL", # Source type URI, # URI URI, # Resolved URI sourceCode, # sourceCode metadata, # metadata blindData # blindData ) node = SdrOsl.OslParser().Parse(discoveryResult) assert node is not None utils.TestShaderPropertiesNode(node)
def setUpClass(cls): cls.URI = "TestNodeOSL.oso" cls.sourceCode = "TestNode source code" cls.metadata = {"extra": "extraMetadata", "primvars": "a|b|c"} cls.blindData = "unused blind data" discoveryResult = Ndr.NodeDiscoveryResult( "TestNodeOSL", # Identifier Ndr.Version(), # Version "TestNodeOSL", # Name "", # Family "oso", # Discovery type (extension) "OSL", # Source type cls.URI, # URI cls.URI, # Resolved URI sourceCode=cls.sourceCode, metadata=cls.metadata, blindData=cls.blindData) cls.node = SdrOsl.OslParser().Parse(discoveryResult) assert cls.node is not None