예제 #1
0
 def parse_resource(self, file_path):
     self.file_path = file_path
     if path.exists(file_path):
         if '__init__.' in file_path:
             folder = path.dirname(file_path)
             model = parsing.TestDataDirectory(source=folder).populate()
         else:
             model = parsing.ResourceFile(file_path).populate()
         return self._parse_robot_data(file_path, model)
     else:
         logging.error('File %s could not be found', file_path)
         raise ValueError('File does not exist: {0}'.format(file_path))
예제 #2
0
 def _parse(self):
     return parsing.ResourceFile(source=self.path).populate()