def test_mainImageListIsPopulated(self): self.assertGreater(len(Helpers.getMainImageFileList()),1)
logger.info('ret code:' +str(retCd)) logger.info('Script returned: ' + str( out)) if Helpers.checkFileNameExists(Helpers.getMatlabFeatureOutputFile()): return SerializeSemanticElements.ToDict(Helpers.getMatlabSemanticElementsOutputFile()) else: return {} except: logger.exception('Error Updating Features For '+i['imageFile']) raise if __name__ == '__main__': counter=0 logger.info('Run Start:' +time.strftime("%m-%d-%Y %H:%M:%S")) print Helpers.getMainImageFileList() for i in Helpers.getMainImageFileList(): if counter > 0: 1 #break counter +=1 print i['dataFileRequiresUpdate'] print i['imageFile'] try: if i['dataFileRequiresUpdate']: logger.info('Image Requires Update: '+i['imageFile']) if i['lcImageExists']: imgFeaturesDict=features(i) semanticElementsDict=semanticElements(i)
def test_mainImageListIsList(self): self.assertEquals(type(Helpers.getMainImageFileList()),list)
import logging import logging.config import Helpers import SysCall import MatlabOutputToJson import time logging.config.fileConfig('logging.conf') logger = logging.getLogger('BatchFeatureExtract') matLabFeatureScr=Helpers.getMatLabFeatureExtractScript() updateCount=0 errorCount=0 limit=0 logger.info('Run Start:' +time.strftime("%m-%d-%Y %H:%M:%S")) for i in Helpers.getMainImageFileList(): #print i #break #logger.info('Image:' +i['imageFile'] + ' modified %s ' % time.ctime(i['imageLastTouched'])) #logger.info('Image:' +i['dataFile'] + ' Exists: '+ str(i['dataFileExists']) + ' Modified %s ' % time.ctime(i['dataLastTouched'])) #logger.info('Requires Update: '+str(i['dataFileRequiresUpdate'])) if i['dataFileRequiresUpdate']: logger.info('Image:' +i['imageFile'] + ' modified %s ' % time.ctime(i['imageLastTouched'])) logger.info('Image:' +i['dataFile'] + ' Exists: '+ str(i['dataFileExists']) + ' Modified %s ' % time.ctime(i['dataLastTouched'])) logger.info('Requires Update: '+str(i['dataFileRequiresUpdate'])) limit+=1 if limit > 1: 1 break logger.info('Needs Update: '+i['imageFile']) try: