Exemplo n.º 1
0
 def __loadConfig(self):
     self.config = loadYamlConfig(__file__, "exif_config.yml")
     self.standards = {}
     for standard in self.config["standards"]:
         try:
             self.standards[standard["name"]] = re.compile(standard["pattern"])
         except Exception, e:
             print "Could not compile re['%s'] = %s due to %s" % (standard["name"], standard["pattern"], str(e))
             raise
Exemplo n.º 2
0
 def __init__(self):
     self.config = {}
     rconfig = loadYamlConfig(__file__, 'test_data_config.yml')
     if isWindows():
         path = rconfig['data_path']['windows']
         self.output_path = rconfig['output_path']['windows']
     elif isMac():
         path = rconfig['data_path']['mac']
         self.output_path = rconfig['output_path']['mac']
     else:
         raise Exception('Unsupported Operating system for TestConfig')
     for name, fn in rconfig['files'].iteritems():
         self.config[name] = os.path.join(path, fn)