def testExecute(self):
     self.run()
     # Compare results
     strXMLExpected = self.readAndParseFile(self.getReferenceDataOutputFile())
     xsDataObtained = self.getPlugin().getDataOutput()
     xsDataExpected = XSDataMOSFLMOutputIndexing.parseString(strXMLExpected)
     EDAssert.strAlmostEqual(xsDataExpected.marshal(), xsDataObtained.marshal(), \
                             "(MOSFLM indexing result comparison - expected versus obtained)")
 def testExecute(self):
     self.run()
     # Compare results
     strXMLExpected = self.readAndParseFile(
         self.getReferenceDataOutputFile())
     xsDataObtained = self.getPlugin().getDataOutput()
     xsDataExpected = XSDataMOSFLMOutputIndexing.parseString(strXMLExpected)
     EDAssert.strAlmostEqual(xsDataExpected.marshal(), xsDataObtained.marshal(), \
                             "(MOSFLM indexing result comparison - expected versus obtained)", _fAbsError=1000.0)
 def testGenerateXSDataIndexingResult(self):
     strFilename = "XSDataMOSFLMOutputIndexing_reference.xml"
     strPath = os.path.join(self.m_strDataPath, strFilename)
     strXMLMOSFLMOutputIndexing = EDUtilsTest.readAndParseFile(strPath)
     from XSDataMOSFLMv10 import XSDataMOSFLMOutputIndexing
     xsDataMOSFLMOutputIndexing = XSDataMOSFLMOutputIndexing.parseString(strXMLMOSFLMOutputIndexing)
     from EDHandlerXSDataMOSFLMv10 import EDHandlerXSDataMOSFLMv10
     xsDataIndexingResult = EDHandlerXSDataMOSFLMv10.generateXSDataIndexingResult(xsDataMOSFLMOutputIndexing)
     strReferenceFilename = "XSDataIndexingResult_reference.xml"
     strReferencePath = os.path.join(self.m_strDataPath, strReferenceFilename)
     strXMLIndexingOutputReference = EDUtilsTest.readAndParseFile(strReferencePath)
     from XSDataMXv1 import  XSDataIndexingResult
     xsdataIndexingResultReference = XSDataIndexingResult.parseString(strXMLIndexingOutputReference)
     EDAssert.equal(xsdataIndexingResultReference.marshal(), xsDataIndexingResult.marshal())
 def testGenerateExecutiveSummary(self):
     """
     """
     pluginIndexing = self.createPlugin()
     pluginIndexing.setScriptExecutable("cat")
     pluginIndexing.configure()
     from XSDataMOSFLMv10 import XSDataMOSFLMInputIndexing
     from XSDataMOSFLMv10 import XSDataMOSFLMOutputIndexing
     strMOSFLMInputIndexingXML = self.readAndParseFile(self.strReferenceDataInputFile)
     strMOSFLMOutputIndexingXML = self.readAndParseFile(self.strReferenceDataOutputFile)
     xsDataMOSFLMInputIndexing = XSDataMOSFLMInputIndexing.parseString(strMOSFLMInputIndexingXML)
     xsDataMOSFLMOutputIndexing = XSDataMOSFLMOutputIndexing.parseString(strMOSFLMOutputIndexingXML)
     pluginIndexing.setDataInput(xsDataMOSFLMInputIndexing)
     pluginIndexing.setDataOutput(xsDataMOSFLMOutputIndexing)
     pluginIndexing.generateExecutiveSummary(pluginIndexing)
     pluginIndexing.verboseScreenExecutiveSummary()
     self.cleanUp(pluginIndexing)
 def testCreateDataMOSFLMOutputIndexing(self):
     """
     """
     pluginIndexing = self.createPlugin()
     pluginIndexing.setScriptExecutable("cat")
     pluginIndexing.configure()
     strBaseName = pluginIndexing.getBaseName()
     shutil.copyfile(os.path.join(self.strUnitTestDataHome, "EDPluginMOSFLMIndexingv10_outputDnaTables_ok.xml"), os.path.join(pluginIndexing.getWorkingDirectory(), strBaseName + "_dnaTables.xml"))
     strNewmatFile = os.path.join(self.strUnitTestDataHome, "EDPluginMOSFLMv10_autoindexMat_ok.txt")
     pluginIndexing.setNewmatFileName(strNewmatFile)
     xsDataMOSFLMOutputIndexing = pluginIndexing.createDataMOSFLMOutputIndexing()
     strReferenceXML = self.readAndParseFile(self.strReferenceDataOutputFile)
     xsDataMOSFLMOutputIndexingReference = XSDataMOSFLMOutputIndexing.parseString(strReferenceXML)
     #print len( strReferenceXML )
     #print len( xsDataMOSFLMOutputIndexing.marshal() )
     EDAssert.equal(xsDataMOSFLMOutputIndexingReference.marshal(), xsDataMOSFLMOutputIndexing.marshal())
     self.cleanUp(pluginIndexing)
Esempio n. 6
0
 def testGenerateExecutiveSummary(self):
     """
     """
     pluginIndexing = self.createPlugin()
     pluginIndexing.setScriptExecutable("cat")
     pluginIndexing.configure()
     from XSDataMOSFLMv10 import XSDataMOSFLMInputIndexing
     from XSDataMOSFLMv10 import XSDataMOSFLMOutputIndexing
     strMOSFLMInputIndexingXML = self.readAndParseFile(self.strReferenceDataInputFile)
     strMOSFLMOutputIndexingXML = self.readAndParseFile(self.strReferenceDataOutputFile)
     xsDataMOSFLMInputIndexing = XSDataMOSFLMInputIndexing.parseString(strMOSFLMInputIndexingXML)
     xsDataMOSFLMOutputIndexing = XSDataMOSFLMOutputIndexing.parseString(strMOSFLMOutputIndexingXML)
     pluginIndexing.setDataInput(xsDataMOSFLMInputIndexing)
     pluginIndexing.setDataOutput(xsDataMOSFLMOutputIndexing)
     pluginIndexing.generateExecutiveSummary(pluginIndexing)
     pluginIndexing.verboseScreenExecutiveSummary()
     self.cleanUp(pluginIndexing)
Esempio n. 7
0
 def testCreateDataMOSFLMOutputIndexing(self):
     """
     """
     pluginIndexing = self.createPlugin()
     pluginIndexing.setScriptExecutable("cat")
     pluginIndexing.configure()
     strBaseName = pluginIndexing.getBaseName()
     shutil.copyfile(os.path.join(self.strUnitTestDataHome, "EDPluginMOSFLMIndexingv10_outputDnaTables_ok.xml"), os.path.join(pluginIndexing.getWorkingDirectory(), strBaseName + "_dnaTables.xml"))
     strNewmatFile = os.path.join(self.strUnitTestDataHome, "EDPluginMOSFLMv10_autoindexMat_ok.txt")
     pluginIndexing.setNewmatFileName(strNewmatFile)
     xsDataMOSFLMOutputIndexing = pluginIndexing.createDataMOSFLMOutputIndexing()
     strReferenceXML = self.readAndParseFile(self.strReferenceDataOutputFile)
     xsDataMOSFLMOutputIndexingReference = XSDataMOSFLMOutputIndexing.parseString(strReferenceXML)
     #print len( strReferenceXML )
     #print len( xsDataMOSFLMOutputIndexing.marshal() )
     # Replace path to log file since it cannot be determined by the unit test
     xsDataMOSFLMOutputIndexing.setPathToLogFile(XSDataFile(XSDataString("MOSFLMIndexingv10.log")))        
     EDAssert.equal(xsDataMOSFLMOutputIndexingReference.marshal(), xsDataMOSFLMOutputIndexing.marshal())
     self.cleanUp(pluginIndexing)
Esempio n. 8
0
 def testGenerateXSDataIndexingResult(self):
     strFilename = "XSDataMOSFLMOutputIndexing_reference.xml"
     strPath = os.path.join(self.m_strDataPath, strFilename)
     strXMLMOSFLMOutputIndexing = EDUtilsTest.readAndParseFile(strPath)
     from XSDataMOSFLMv10 import XSDataMOSFLMOutputIndexing
     xsDataMOSFLMOutputIndexing = XSDataMOSFLMOutputIndexing.parseString(
         strXMLMOSFLMOutputIndexing)
     from EDHandlerXSDataMOSFLMv10 import EDHandlerXSDataMOSFLMv10
     xsDataIndexingResult = EDHandlerXSDataMOSFLMv10.generateXSDataIndexingResult(
         xsDataMOSFLMOutputIndexing)
     strReferenceFilename = "XSDataIndexingResult_reference.xml"
     strReferencePath = os.path.join(self.m_strDataPath,
                                     strReferenceFilename)
     strXMLIndexingOutputReference = EDUtilsTest.readAndParseFile(
         strReferencePath)
     from XSDataMXv1 import XSDataIndexingResult
     xsdataIndexingResultReference = XSDataIndexingResult.parseString(
         strXMLIndexingOutputReference)
     EDAssert.equal(xsdataIndexingResultReference.marshal(),
                    xsDataIndexingResult.marshal())