def testCheckParameters(self):
     xsDataInput = XSDataInputMatrixInvertFile()
     xsDataInput.setInputMatrixFile(XSDataFile())
     xsDataInput.setOutputMatrixFile(XSDataFile())
     edPluginExecMatrixInvertFile = self.createPlugin()
     edPluginExecMatrixInvertFile.setDataInput(xsDataInput)
     edPluginExecMatrixInvertFile.checkParameters()
예제 #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 = XSDataInputMatrixInvertFile.parseString(self.readAndParseFile(self.getDataInputFile()))
        self.inputFile = xsDataInput.getInputMatrixFile().getPath().getValue()

        self.xsDataResultReference = XSDataResultMatrixInvertFile.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)
    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 = XSDataInputMatrixInvertFile.parseString(self.readAndParseFile(self.getDataInputFile()))
        self.inputFile = xsDataInput.getInputMatrixFile().getPath().getValue()

        self.xsDataResultReference = XSDataResultMatrixInvertFile.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)