コード例 #1
0
 def doSuccessExecInvert(self, _edPlugin=None):
     EDVerbose.DEBUG("EDPluginControlMatrixInvertFilev1_0.doSuccessExecInvert")
     self.retrieveSuccessMessages(_edPlugin, "EDPluginControlMatrixInvertFilev1_0.doSuccessExecInvert")
     xsdmat = _edPlugin.getDataOutput().getOutputMatrix()
     xsdin = XSDataInputWriteMatrix()
     xsdin.setInputMatrix(xsdmat)
     xsdin.setOutputMatrixFile(self.getDataInput().getOutputMatrixFile())
     self.__edPluginExecWrite.setDataInput(xsdin)
     self.__edPluginExecWrite.connectSUCCESS(self.doSuccessExecWrite)
     self.__edPluginExecWrite.connectFAILURE(self.doFailureExecWrite)
     self.__edPluginExecWrite.executeSynchronous()
コード例 #2
0
    def preProcess(self):
        """
        PreProcess of the execution test: download a set of images  from http://www.edna-site.org
        and delete any output file
        """
        EDTestCasePluginExecute.preProcess(self)

        xsDataInput = XSDataInputWriteMatrix.parseString(
            self.readAndParseFile(self.getDataInputFile()))
        self.inputFile = xsDataInput.getOutputMatrixFile().getPath().getValue()

        self.xsDataResultReference = XSDataResultWriteMatrix.parseString(
            self.readAndParseFile(self.getReferenceDataOutputFile()))
        self.outputFile = self.xsDataResultReference.getOutputMatrixFile(
        ).getPath().getValue()

        self.loadTestImage([
            os.path.basename(self.inputFile),
            os.path.basename(self.outputFile)
        ])

        if not os.path.isdir(os.path.dirname(self.outputFile)):
            os.makedirs(os.path.dirname(self.outputFile))
        if os.path.isfile(self.outputFile):
            EDVerbose.DEBUG(" Output file exists %s, I will remove it" %
                            self.outputFile)
            os.remove(self.outputFile)
コード例 #3
0
 def testCheckParameters(self):
     xsDataInput = XSDataInputWriteMatrix()
     xsDataInput.setInputMatrix(XSDataArray())
     xsDataInput.setOutputMatrixFile(XSDataFile())
     edPluginExecMatrixWrite = self.createPlugin()
     edPluginExecMatrixWrite.setDataInput(xsDataInput)
     edPluginExecMatrixWrite.checkParameters()
コード例 #4
0
 def doSuccessExecInvert(self, _edPlugin=None):
     EDVerbose.DEBUG(
         "EDPluginControlMatrixInvertFilev1_0.doSuccessExecInvert")
     self.retrieveSuccessMessages(
         _edPlugin,
         "EDPluginControlMatrixInvertFilev1_0.doSuccessExecInvert")
     xsdmat = _edPlugin.getDataOutput().getOutputMatrix()
     xsdin = XSDataInputWriteMatrix()
     xsdin.setInputMatrix(xsdmat)
     xsdin.setOutputMatrixFile(self.getDataInput().getOutputMatrixFile())
     self.__edPluginExecWrite.setDataInput(xsdin)
     self.__edPluginExecWrite.connectSUCCESS(self.doSuccessExecWrite)
     self.__edPluginExecWrite.connectFAILURE(self.doFailureExecWrite)
     self.__edPluginExecWrite.executeSynchronous()
コード例 #5
0
    def preProcess(self):
        """
        PreProcess of the execution test: download a set of images  from http://www.edna-site.org
        and delete any output file
        """
        EDTestCasePluginExecute.preProcess(self)

        xsDataInput = XSDataInputWriteMatrix.parseString(self.readAndParseFile(self.getDataInputFile()))
        self.inputFile = xsDataInput.getOutputMatrixFile().getPath().getValue()

        self.xsDataResultReference = XSDataResultWriteMatrix.parseString(self.readAndParseFile(self.getReferenceDataOutputFile()))
        self.outputFile = self.xsDataResultReference.getOutputMatrixFile().getPath().getValue()

        self.loadTestImage([os.path.basename(self.inputFile), os.path.basename(self.outputFile) ])

        if not os.path.isdir(os.path.dirname(self.outputFile)):
            os.makedirs(os.path.dirname(self.outputFile))
        if os.path.isfile(self.outputFile):
            EDVerbose.DEBUG(" Output file exists %s, I will remove it" % self.outputFile)
            os.remove(self.outputFile)