def testGenerateXSDataInputFIT2DCake(self):
     strReferenceInputFile = os.path.join(self.m_strDataPath, "XSDataInputPowderDiffraction_reference.xml")
     strXMLInput = EDUtilsTest.readAndParseFile(strReferenceInputFile)
     EDApplication.loadModule("XSDataDiffractionCTv1")
     from XSDataDiffractionCTv1 import XSDataInputPowderIntegration
     xsDataInputPowderIntegration = XSDataInputPowderIntegration.parseString(strXMLInput)
     from EDHandlerXSDataFIT2Dv1_0 import EDHandlerXSDataFIT2Dv1_0
     edHandlerXSDataFIT2Dv1_0 = EDHandlerXSDataFIT2Dv1_0()
     xsDataInputFIT2DCake = edHandlerXSDataFIT2Dv1_0.getXSDataInputFIT2DCake(xsDataInputPowderIntegration)
     strReferencePath = os.path.join(self.m_strDataPath, "XSDataInputFIT2DCake_reference.xml")
     strXMLInputReference = EDUtilsTest.readAndParseFile(strReferencePath)
     EDApplication.loadModule("XSDataFIT2Dv1_0")
     from XSDataFIT2Dv1_0 import XSDataInputFIT2DCake
     xsDataInputFIT2DCakeReference = XSDataInputFIT2DCake.parseString(strXMLInputReference)
     EDAssert.equal(xsDataInputFIT2DCakeReference.marshal(), xsDataInputFIT2DCake.marshal())
 def testGenerateXSDataInputFIT2DCake(self):
     strReferenceInputFile = os.path.join(
         self.m_strDataPath, "XSDataInputPowderDiffraction_reference.xml")
     strXMLInput = EDUtilsTest.readAndParseFile(strReferenceInputFile)
     EDApplication.loadModule("XSDataDiffractionCTv1")
     from XSDataDiffractionCTv1 import XSDataInputPowderIntegration
     xsDataInputPowderIntegration = XSDataInputPowderIntegration.parseString(
         strXMLInput)
     from EDHandlerXSDataFIT2Dv1_0 import EDHandlerXSDataFIT2Dv1_0
     edHandlerXSDataFIT2Dv1_0 = EDHandlerXSDataFIT2Dv1_0()
     xsDataInputFIT2DCake = edHandlerXSDataFIT2Dv1_0.getXSDataInputFIT2DCake(
         xsDataInputPowderIntegration)
     strReferencePath = os.path.join(self.m_strDataPath,
                                     "XSDataInputFIT2DCake_reference.xml")
     strXMLInputReference = EDUtilsTest.readAndParseFile(strReferencePath)
     EDApplication.loadModule("XSDataFIT2Dv1_0")
     from XSDataFIT2Dv1_0 import XSDataInputFIT2DCake
     xsDataInputFIT2DCakeReference = XSDataInputFIT2DCake.parseString(
         strXMLInputReference)
     EDAssert.equal(xsDataInputFIT2DCakeReference.marshal(),
                    xsDataInputFIT2DCake.marshal())
Esempio n. 3
0
 def testCheckParameters(self):
     edPluginFIT2D = self.createPlugin()
     edStringXMLInput = EDUtilsTest.readAndParseFile(self.m_edStringReferenceInputFileName)
     xsDataInputFIT2DCake = XSDataInputFIT2DCake.parseString(edStringXMLInput)
     edPluginFIT2D.setDataInput(xsDataInputFIT2DCake)
     edPluginFIT2D.checkParameters()