Ejemplo n.º 1
0
 def test_packingFunctions_1(self):
     data = 'I am a random string to be used for this test!'
     self.assertEqual(pUtils.pUnpack(pUtils.pPack(data)),data)
Ejemplo n.º 2
0
                    self.testMeasurementList = self.limitManager.testMeasurementList
                    if self.testSuite:
                        self.stringDictionary.update(self.testSuite.stringDictionary)
                        self.numericDictionary.update(self.testSuite.numericDictionary)
                        self.filePointerDictionary.update(self.testSuite.filePointerDictionary)
                    else:
                        self.stringDictionary = {}
                        self.numericDictionary = {}
                    self.dependencyDict = self.configurationManager.getDependencyDict()
                    
                    self.fileDictionary = {}  
                    if self.isMemoryOnly==False:
                        for pointerID, fileRelativePath in self.filePointerDictionary.iteritems():
                            fileFullPath = os.path.join(self.testRunFolder,fileRelativePath)
                            fileData = pUtils.quickFileRead(fileFullPath,'rb')
                            self.fileDictionary[pointerID] = pUtils.pPack(fileData)
                         
                        ### Write data file
                        self.writeTestRunDataFiles()

                    
                    if self.isDatabaseEnable:
                        
                        #Test Database connectivity
                        if not self.isDatabaseReachable():
                            self.guiApi.sendMessage(
                                {'command':'pDialog',
                                 'buttonTextList':['OK'],
                                 'msg':'Unable to reach the database',
                                 'imageFileName':'networkProblem.png'})