def ITERATIVETEST_Variation_Of_Input_Parameter_inBins(): """Tests variation of input value at field "inBins".""" Logging.infoHTML( "<b>ToDo: Add more \"TestData\" objects to maximize variations!</b>" ) testDataVariations = { "Variation_1" : __getTestDataVariation1_inBins(), } return ( testDataVariations, executeTestOfUpdate )
def __getEmptyObjectTestData_inMidsagittalSurface(): testData = __getDefaultTestData() Logging.infoHTML( "<b>ToDo: Replace \"None\" with a path pointing to an empty object!</b>" ) testData.inMidsagittalSurfacePath = None return testData
def ITERATIVETEST_Variation_Of_Input_Image_input0(): """Tests variation of input image connected at field "input0".""" Logging.infoHTML( "<b>ToDo: Add more \"TestData\" objects to maximize variations!</b>" ) testDataVariations = { "Variation_1" : __getTestDataVariation1_input0(), } return ( testDataVariations, executeTestOfUpdate )
def ITERATIVETEST_Error_Of_Input_Image_input0(): """Tests occurrence of an error because of an invalid image provided at field "input0".""" Logging.infoHTML( "<b>ToDo: Add more \"TestData\" objects to maximize variations!</b>" ) testDataVariations = { "Missing_Object" : __getMissingObjectTestData_input0(), } return ( testDataVariations, testError_input0 )
def ITERATIVETEST_Variation_Of_Input_Base_inMidsagittalSurface(): """Tests variation of input Base object connected at field "inMidsagittalSurface".""" Logging.infoHTML( "<b>ToDo: Add more \"TestData\" objects to maximize variations!</b>" ) testDataVariations = { "Variation_1" : __getTestDataVariation1_inMidsagittalSurface(), } return ( testDataVariations, executeTestOfUpdate )
def __getTestDataVariation1_inOptimizer(): testData = __getDefaultTestData() Logging.infoHTML( "<b>ToDo: Replace \"None\" with reliable variation values!</b>") testData.inOptimizer = None testData.output0ReferencePath = None return testData
def ITERATIVETEST_Error_Of_Input_Parameter_inBins(): """Tests occurrence of an error because of an invalid input value provided at field "inBins".""" Logging.infoHTML( "<b>ToDo: Add more \"TestData\" objects to maximize variations!</b>" ) testDataVariations = { "Invalid_Variation_1" : __getInvalidTestDataVariation1_inBins(), "Invalid_Variation_2" : __getInvalidTestDataVariation2_inBins(), } return ( testDataVariations, testError_inBins )
def ITERATIVETEST_Variation_Of_Input_Base_inMidsagittalSurface(): """Tests variation of input Base object connected at field "inMidsagittalSurface".""" Logging.infoHTML( "<b>ToDo: Add more \"TestData\" objects to maximize variations!</b>") testDataVariations = { "Variation_1": __getTestDataVariation1_inMidsagittalSurface(), } return (testDataVariations, executeTestOfUpdate)
def ITERATIVETEST_Error_Of_Input_Base_inMidsagittalSurface(): """Tests occurrence of an error because of an invalid Base object connected at field "inMidsagittalSurface".""" Logging.infoHTML( "<b>ToDo: Add more \"TestData\" objects to maximize variations!</b>" ) testDataVariations = { "Missing_Object" : __getMissingObjectTestData_inMidsagittalSurface(), "Empty_Object" : __getEmptyObjectTestData_inMidsagittalSurface(), } return ( testDataVariations, testError_inMidsagittalSurface )
def ITERATIVETEST_Error_Of_Input_Base_inMidsagittalSurface(): """Tests occurrence of an error because of an invalid Base object connected at field "inMidsagittalSurface".""" Logging.infoHTML( "<b>ToDo: Add more \"TestData\" objects to maximize variations!</b>") testDataVariations = { "Missing_Object": __getMissingObjectTestData_inMidsagittalSurface(), "Empty_Object": __getEmptyObjectTestData_inMidsagittalSurface(), } return (testDataVariations, testError_inMidsagittalSurface)
def __getTestDataVariation1_inBins(): testData = __getDefaultTestData() Logging.infoHTML( "<b>ToDo: Replace \"None\" with reliable variation values!</b>" ) testData.inBins = None testData.output0ReferencePath = None testData.outPlane = None testData.outCMSPx = None testData.outLog = None return testData
def __getInvalidTestDataVariation2_inOptimizer(): Logging.infoHTML( "<b>ToDo: Rename function that the name matches the intention of returned test data!</b>" ) testData = __getDefaultTestData() Logging.infoHTML( "<b>ToDo: Replace \"None\" with a reliable invalid value of \"inOptimizer\"!</b>" ) testData.inOptimizer = None return testData
def __getDefaultTestData(): """Returns a default and valid TestData object.""" Logging.infoHTML( "<b>ToDo: Set valid values for default TestData object!</b>" ) testData = TestData() testData.input0Path = None testData.inBins = None testData.output0ReferencePath = None testData.outPlane = None testData.outCMSPx = None testData.outLog = None return testData
def __getChecksToValidateOutputAfterUpdate( testData ): checks = ( AMChecks.ImageCompareCheck( "Validate_output0" ), AMChecks.FloatEqualCheck( fieldName = "{}.outPlane".format( MODULE_NAME ), value = testData.outPlane, epsilon = 0.0 ), AMChecks.EqualCheck( fieldName = "{}.outCMSPx".format( MODULE_NAME ), value = testData.outCMSPx ), AMChecks.EqualCheck( fieldName = "{}.outLog".format( MODULE_NAME ), value = testData.outLog ), ) Logging.infoHTML( "<b>ToDo: Set up epsilon value of \"FloatEqualCheck\" objects!</b>" ) return checks
def __getDefaultTestData(): """Returns a default and valid TestData object.""" Logging.infoHTML( "<b>ToDo: Set valid values for default TestData object!</b>" ) testData = TestData() testData.input0Path = None testData.inMidsagittalSurfacePath = None testData.inIntersectionMode = None testData.inVolumeThreshold = None testData.inUseGlobalSubsample = None testData.inGlobalSubsample = None testData.inXSubsample = None testData.inYSubsample = None testData.inZSubsample = None testData.output0ReferencePath = None return testData
def __getDefaultTestData(): """Returns a default and valid TestData object.""" Logging.infoHTML( "<b>ToDo: Set valid values for default TestData object!</b>") testData = TestData() testData.input0Path = None testData.inMidsagittalSurfacePath = None testData.inIntersectionMode = None testData.inVolumeThreshold = None testData.inUseGlobalSubsample = None testData.inGlobalSubsample = None testData.inXSubsample = None testData.inYSubsample = None testData.inZSubsample = None testData.output0ReferencePath = None return testData
def __getDefaultTestData(): """Returns a default and valid TestData object.""" Logging.infoHTML( "<b>ToDo: Set valid values for default TestData object!</b>" ) testData = TestData() testData.input0Path = None testData.input1Path = None testData.inPlane1 = None testData.inPlane2 = None testData.inUseSecondPlane = None testData.inCMSPx = None testData.inBins = None testData.inGridSize = None testData.inMaxSize = None testData.inDelta = None testData.inEps = None testData.inOptimizer = None testData.output0ReferencePath = None return testData
def __getDefaultTestData(): """Returns a default and valid TestData object.""" Logging.infoHTML( "<b>ToDo: Set valid values for default TestData object!</b>") testData = TestData() testData.input0Path = None testData.input1Path = None testData.inPlane1 = None testData.inPlane2 = None testData.inUseSecondPlane = None testData.inCMSPx = None testData.inBins = None testData.inGridSize = None testData.inMaxSize = None testData.inDelta = None testData.inEps = None testData.inOptimizer = None testData.output0ReferencePath = None return testData
def __getDefaultTestData(): """Returns a default and valid TestData object.""" Logging.infoHTML( "<b>ToDo: Set valid values for default TestData object!</b>" ) testData = TestData() return testData
def __getTestDataVariation1_inOptimizer(): testData = __getDefaultTestData() Logging.infoHTML( "<b>ToDo: Replace \"None\" with reliable variation values!</b>" ) testData.inOptimizer = None testData.output0ReferencePath = None return testData
def __getInvalidTestDataVariation2_inBins(): Logging.infoHTML( "<b>ToDo: Rename function that the name matches the intention of returned test data!</b>" ) testData = __getDefaultTestData() Logging.infoHTML( "<b>ToDo: Replace \"None\" with a reliable invalid value of \"inBins\"!</b>" ) testData.inBins = None return testData