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 = XSDataInputMatrixInvertv2.parseString( self.readAndParseFile(self.getDataInputFile())) self.inputFile = xsDataInput.getInputMatrix().getPath().getValue() self.xsDataResultReference = XSDataResultMatrixInvertv2.parseString( self.readAndParseFile(self.getReferenceDataOutputFile())) self.outputFile = self.xsDataResultReference.getOutputMatrix().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) self.loadTestImage(["test_region1_dark_1_0040.edf", "inverted.edf"]) if not os.path.isdir(destDir): os.makedirs(destDir) EDShare[XSDataInputMatrixInvertv2.parseFile(self.getDataInputFile()).inputMatrix.shared.value] = fabio.open( os.path.join(self.getTestsDataImagesHome(), "test_region1_dark_1_0040.edf") ).data
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) self.loadTestImage(["test_region1_dark_1_0040.edf", 'inverted.edf']) if not os.path.isdir(destDir): os.makedirs(destDir) EDShare[XSDataInputMatrixInvertv2.parseFile( self.getDataInputFile()).inputMatrix.shared.value] = fabio.open( os.path.join(self.getTestsDataImagesHome(), "test_region1_dark_1_0040.edf")).data
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 = XSDataInputMatrixInvertv2.parseString(self.readAndParseFile(self.getDataInputFile())) self.inputFile = xsDataInput.getInputMatrix().getPath().getValue() self.xsDataResultReference = XSDataResultMatrixInvertv2.parseString( self.readAndParseFile(self.getReferenceDataOutputFile()) ) self.outputFile = self.xsDataResultReference.getOutputMatrix().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)