Exemple #1
0
    def testExecute(self):
        """
        execute the execution test 
        """
        self.run()
        # Checks the expected result
        strExpectedOutput = self.readAndParseFile (self.getReferenceDataOutputFile())
        strObtainedOutput = self.readAndParseFile (self.m_edObtainedOutputDataFile)
        EDVerbose.DEBUG("Checking obtained result...")
        xsDataResultReference = XSDataResultExecCommandLine.parseString(strExpectedOutput)
        xsDataResultObtained = XSDataResultExecCommandLine.parseString(strObtainedOutput)

        EDAssert.equal(xsDataResultReference.marshal(), xsDataResultObtained.marshal())
Exemple #2
0
 def preProcess(self):
     """
     PreProcess of the execution test: download an EDF file from http://www.edna-site.org
     and remove any existing output file, i.e. /tmp/diff6105.edf 
     """
     EDTestCasePluginExecute.preProcess(self)
     self.loadTestImage([ "test_region1_dark_1_0041.edf"])
     strExpectedOutput = self.readAndParseFile (self.getReferenceDataOutputFile())
     xsDataResultReference = XSDataResultExecCommandLine.parseString(strExpectedOutput)
     outputFileName = xsDataResultReference.getOutputFilename().getPath().getValue()
     EDVerbose.DEBUG(" Output file is %s" % outputFileName)
     if os.path.isfile(outputFileName):
         EDVerbose.DEBUG(" Output file exists %s, I will remove it" % outputFileName)
         os.remove(outputFileName)
     outputDirName = os.path.dirname(outputFileName)
     if not os.path.isdir(outputDirName):
         os.makedirs(outputDirName, int("777", 8))