예제 #1
0
    def testGenerateExecutiveSummary(self):
        """
        This method tests the generateExecutiveSummary of the Labelit plugin.
        It contains no assert call so the contents of the executive summary is not tested.
        """
        edPluginLabelitIndexingv1_1 = self.createPlugin()
        xmlInput1 = self.readAndParseFile(self.__strReferenceInputFile1)
        edPluginLabelitIndexingv1_1.setDataInput(xmlInput1, "referenceImage")
        xmlInput2 = self.readAndParseFile(self.__strReferenceInputFile1)
        edPluginLabelitIndexingv1_1.setDataInput(xmlInput2, "referenceImage")

        strLabelitScreenOutputFile = os.path.join(
            self.getPluginTestsDataHome(),
            "XSDataLabelitScreenOutput_reference.xml")
        strLabelitScreenOutputXML = self.readAndParseFile(
            strLabelitScreenOutputFile)
        from XSDataLabelitv1_1 import XSDataLabelitScreenOutput
        xsDataLabelitScreenOutputReference = XSDataLabelitScreenOutput.parseString(
            strLabelitScreenOutputXML)
        edPluginLabelitIndexingv1_1.setDataOutput(
            xsDataLabelitScreenOutputReference, "labelitScreenOutput")

        strLabelitMosflmScriptsOutputFile = os.path.join(
            self.getPluginTestsDataHome(),
            "XSDataLabelitMosflmScriptsOutput_reference.xml")
        strLabelitMosflmScriptsOutputXML = self.readAndParseFile(
            strLabelitMosflmScriptsOutputFile)
        from XSDataLabelitv1_1 import XSDataLabelitMosflmScriptsOutput
        xsDataLabelitMosflmScriptsOutputReference = XSDataLabelitMosflmScriptsOutput.parseString(
            strLabelitMosflmScriptsOutputXML)
        edPluginLabelitIndexingv1_1.setDataOutput(
            xsDataLabelitMosflmScriptsOutputReference, "mosflmScriptOutput")

        edPluginLabelitIndexingv1_1.generateExecutiveSummary(
            edPluginLabelitIndexingv1_1)
 def testParseLabelitScreenOutput(self):
     """
     This method test the parsing of the Labelit results in the log file.
     """
     edPluginLabelitIndexingv1_1 = self.createPlugin()
     strPathToLabelitLogText = os.path.join(self.getPluginTestsDataHome(), "labelit_v1000rc11.log")
     strLabelitLogText = self.readAndParseFile(strPathToLabelitLogText)
     xsDataLabelitScreenOutput = edPluginLabelitIndexingv1_1.parseLabelitScreenOutput(strLabelitLogText)
     strLabelitScreenOutputFile = os.path.join(self.getPluginTestsDataHome(), "XSDataLabelitScreenOutput_reference.xml")
     strLabelitScreenOutputXML = self.readAndParseFile(strLabelitScreenOutputFile)
     from XSDataLabelitv1_1 import XSDataLabelitScreenOutput
     xsDataLabelitScreenOutputReference = XSDataLabelitScreenOutput.parseString(strLabelitScreenOutputXML)
     EDAssert.equal(xsDataLabelitScreenOutputReference.marshal(), xsDataLabelitScreenOutput.marshal())
예제 #3
0
 def testParseLabelitScreenOutput(self):
     """
     This method test the parsing of the Labelit results in the log file.
     """
     edPluginLabelitIndexingv1_1 = self.createPlugin()
     strPathToLabelitLogText = os.path.join(self.getPluginTestsDataHome(),
                                            "labelit_v1000rc11.log")
     strLabelitLogText = self.readAndParseFile(strPathToLabelitLogText)
     xsDataLabelitScreenOutput = edPluginLabelitIndexingv1_1.parseLabelitScreenOutput(
         strLabelitLogText)
     strLabelitScreenOutputFile = os.path.join(
         self.getPluginTestsDataHome(),
         "XSDataLabelitScreenOutput_reference.xml")
     strLabelitScreenOutputXML = self.readAndParseFile(
         strLabelitScreenOutputFile)
     from XSDataLabelitv1_1 import XSDataLabelitScreenOutput
     xsDataLabelitScreenOutputReference = XSDataLabelitScreenOutput.parseString(
         strLabelitScreenOutputXML)
     EDAssert.equal(xsDataLabelitScreenOutputReference.marshal(),
                    xsDataLabelitScreenOutput.marshal())
    def testGenerateExecutiveSummary(self):
        """
        This method tests the generateExecutiveSummary of the Labelit plugin.
        It contains no assert call so the contents of the executive summary is not tested.
        """
        edPluginLabelitIndexingv1_1 = self.createPlugin()
        xmlInput1 = self.readAndParseFile(self.__strReferenceInputFile1)
        edPluginLabelitIndexingv1_1.setDataInput(xmlInput1, "referenceImage")
        xmlInput2 = self.readAndParseFile(self.__strReferenceInputFile1)
        edPluginLabelitIndexingv1_1.setDataInput(xmlInput2, "referenceImage")

        strLabelitScreenOutputFile = os.path.join(self.getPluginTestsDataHome(), "XSDataLabelitScreenOutput_reference.xml")
        strLabelitScreenOutputXML = self.readAndParseFile(strLabelitScreenOutputFile)
        from XSDataLabelitv1_1 import XSDataLabelitScreenOutput
        xsDataLabelitScreenOutputReference = XSDataLabelitScreenOutput.parseString(strLabelitScreenOutputXML)
        edPluginLabelitIndexingv1_1.setDataOutput(xsDataLabelitScreenOutputReference, "labelitScreenOutput")

        strLabelitMosflmScriptsOutputFile = os.path.join(self.getPluginTestsDataHome(), "XSDataLabelitMosflmScriptsOutput_reference.xml")
        strLabelitMosflmScriptsOutputXML = self.readAndParseFile(strLabelitMosflmScriptsOutputFile)
        from XSDataLabelitv1_1 import XSDataLabelitMosflmScriptsOutput
        xsDataLabelitMosflmScriptsOutputReference = XSDataLabelitMosflmScriptsOutput.parseString(strLabelitMosflmScriptsOutputXML)
        edPluginLabelitIndexingv1_1.setDataOutput(xsDataLabelitMosflmScriptsOutputReference, "mosflmScriptOutput")

        edPluginLabelitIndexingv1_1.generateExecutiveSummary(edPluginLabelitIndexingv1_1)