def testGenerateXSDataInputISPyB(self): """ This method is testing the generation of the XSDataInputISPyB object given a XSDataIndexingInput object. """ strReferenceInputControlISPyBFile = EDUtilsPath.mergePath( self.strDataPath, "XSDataInputControlISPyB_reference.xml") strPath = os.path.join(self.strDataPath, strReferenceInputControlISPyBFile) strXMLIndexingInput = self.readAndParseFile(strPath) from XSDataMXv1 import XSDataInputControlISPyB xsDataInputControlISPyB = XSDataInputControlISPyB.parseString( strXMLIndexingInput) from EDHandlerXSDataISPyBv1_1 import EDHandlerXSDataISPyBv1_1 xsDataInputISPyB = EDHandlerXSDataISPyBv1_1.generateXSDataInputISPyB( xsDataInputControlISPyB) strReferenceInputISPyBFile = EDUtilsPath.mergePath( self.strDataPath, "XSDataInputISPyB_reference.xml") strReferencePath = os.path.join(self.strDataPath, strReferenceInputISPyBFile) strXMLInputISPyBReference = self.readAndParseFile(strReferencePath) EDFactoryPluginStatic.loadModule("XSDataISPyBv1_1") from XSDataISPyBv1_1 import XSDataInputISPyB xsDataInputISPyBReference = XSDataInputISPyB.parseString( strXMLInputISPyBReference) # Remove the time strings since they otherwise make the test fail xsDataInputISPyBReference.getScreening().setTimeStamp(None) xsDataInputISPyB.getScreening().setTimeStamp(None) EDAssert.equal(xsDataInputISPyBReference.marshal(), xsDataInputISPyB.marshal())
def testGetBestWilsonPlotPath(self): strReferenceInputControlISPyBFile = EDUtilsPath.mergePath(self.strDataPath, "XSDataInputControlISPyB_reference.xml") strPath = os.path.join(self.strDataPath, strReferenceInputControlISPyBFile) strXMLIndexingInput = EDUtilsFile.readFileAndParseVariables(strPath, self.dictReplace) xsDataInputControlISPyB = XSDataInputControlISPyB.parseString(strXMLIndexingInput) xsDataCharacterisationResult = xsDataInputControlISPyB.characterisationResult strPath = EDHandlerXSDataISPyBv1_4.getBestWilsonPlotPath(xsDataCharacterisationResult) EDAssert.equal(True, strPath.endswith("B.jpg"), "Wilson plot path extracted from characterisation results")
def testGenerateXSDataInputISPyB(self): """ This method is testing the generation of the XSDataInputISPyB object given a XSDataIndexingInput object. """ strReferenceInputControlISPyBFile = EDUtilsPath.mergePath(self.strDataPath, "XSDataInputControlISPyB_reference.xml") strPath = os.path.join(self.strDataPath, strReferenceInputControlISPyBFile) strXMLIndexingInput = EDUtilsFile.readFileAndParseVariables(strPath, self.dictReplace) xsDataInputControlISPyB = XSDataInputControlISPyB.parseString(strXMLIndexingInput) xsDataInputISPyB = EDHandlerXSDataISPyBv1_4.generateXSDataInputISPyBStoreScreening(xsDataInputControlISPyB) strReferenceInputISPyBFile = EDUtilsPath.mergePath(self.strDataPath, "XSDataInputISPyB_reference.xml") strReferencePath = os.path.join(self.strDataPath, strReferenceInputISPyBFile) strXMLInputISPyBReference = EDUtilsFile.readFileAndParseVariables(strReferencePath, self.dictReplace) EDFactoryPluginStatic.loadModule("XSDataISPyBv1_4")
def testGenerateXSDataInputISPyB(self): """ This method is testing the generation of the XSDataInputISPyB object given a XSDataIndexingInput object. """ strReferenceInputControlISPyBFile = EDUtilsPath.mergePath(self.strDataPath, "XSDataInputControlISPyB_reference.xml") strPath = os.path.join(self.strDataPath, strReferenceInputControlISPyBFile) strXMLIndexingInput = EDUtilsFile.readFileAndParseVariables(strPath, self.dictReplace) xsDataInputControlISPyB = XSDataInputControlISPyB.parseString(strXMLIndexingInput) xsDataInputISPyB = EDHandlerXSDataISPyBv1_3.generateXSDataInputISPyBStoreScreening(xsDataInputControlISPyB) print xsDataInputISPyB.marshal() strReferenceInputISPyBFile = EDUtilsPath.mergePath(self.strDataPath, "XSDataInputISPyB_reference.xml") strReferencePath = os.path.join(self.strDataPath, strReferenceInputISPyBFile) strXMLInputISPyBReference = EDUtilsFile.readFileAndParseVariables(strReferencePath, self.dictReplace) EDFactoryPluginStatic.loadModule("XSDataISPyBv1_3")
def testGetBestWilsonPlotPath(self): strReferenceInputControlISPyBFile = EDUtilsPath.mergePath( self.strDataPath, "XSDataInputControlISPyB_reference.xml") strPath = os.path.join(self.strDataPath, strReferenceInputControlISPyBFile) strXMLIndexingInput = EDUtilsFile.readFileAndParseVariables( strPath, self.dictReplace) xsDataInputControlISPyB = XSDataInputControlISPyB.parseString( strXMLIndexingInput) xsDataCharacterisationResult = xsDataInputControlISPyB.characterisationResult strPath = EDHandlerXSDataISPyBv1_4.getBestWilsonPlotPath( xsDataCharacterisationResult) EDAssert.equal( True, strPath.endswith("B.jpg"), "Wilson plot path extracted from characterisation results")
def testGenerateXSDataInputISPyB(self): """ This method is testing the generation of the XSDataInputISPyB object given a XSDataIndexingInput object. """ strReferenceInputControlISPyBFile = EDUtilsPath.mergePath(self.strDataPath, "XSDataInputControlISPyB_reference.xml") strPath = os.path.join(self.strDataPath, strReferenceInputControlISPyBFile) strXMLIndexingInput = self.readAndParseFile(strPath) from XSDataMXv1 import XSDataInputControlISPyB xsDataInputControlISPyB = XSDataInputControlISPyB.parseString(strXMLIndexingInput) from EDHandlerXSDataISPyBv1_1 import EDHandlerXSDataISPyBv1_1 xsDataInputISPyB = EDHandlerXSDataISPyBv1_1.generateXSDataInputISPyB(xsDataInputControlISPyB) strReferenceInputISPyBFile = EDUtilsPath.mergePath(self.strDataPath, "XSDataInputISPyB_reference.xml") strReferencePath = os.path.join(self.strDataPath, strReferenceInputISPyBFile) strXMLInputISPyBReference = self.readAndParseFile(strReferencePath) EDFactoryPluginStatic.loadModule("XSDataISPyBv1_1") from XSDataISPyBv1_1 import XSDataInputISPyB xsDataInputISPyBReference = XSDataInputISPyB.parseString(strXMLInputISPyBReference) # Remove the time strings since they otherwise make the test fail xsDataInputISPyBReference.getScreening().setTimeStamp(None) xsDataInputISPyB.getScreening().setTimeStamp(None) EDAssert.equal(xsDataInputISPyBReference.marshal(), xsDataInputISPyB.marshal())