Beispiel #1
0
 def import_from_dict(cls, data):
     data['executables'] = [
         Executable.import_from_dict(executable_data)
         for executable_data in data['executables']
     ]
     data['executables'] = dict([(executable.filename, executable)
                                 for executable in data['executables']])
     data['testcases'] = [
         Testcase.import_from_dict(testcase_data)
         for testcase_data in data['testcases']
     ]
     data['managers'] = [
         Manager.import_from_dict(manager_data)
         for manager_data in data['managers']
     ]
     data['managers'] = dict([(manager.filename, manager)
                              for manager in data['managers']])
     data['files'] = [
         File.import_from_dict(file_data) for file_data in data['files']
     ]
     data['files'] = dict([(file_.filename, file_)
                           for file_ in data['files']])
     # XXX We convert the key from str to int because it was the key
     # of a JSON object.
     data['evaluations'] = dict(
         (int(k), v) for k, v in data['evaluations'].iteritems())
     return cls(**data)
Beispiel #2
0
 def import_from_dict(cls, data):
     data["files"] = [File.import_from_dict(file_data) for file_data in data["files"]]
     data["files"] = dict([(file_.filename, file_) for file_ in data["files"]])
     data["managers"] = [Manager.import_from_dict(manager_data) for manager_data in data["managers"]]
     data["managers"] = dict([(manager.filename, manager) for manager in data["managers"]])
     data["executables"] = [Executable.import_from_dict(executable_data) for executable_data in data["executables"]]
     data["executables"] = dict([(executable.filename, executable) for executable in data["executables"]])
     return cls(**data)
Beispiel #3
0
 def import_from_dict(cls, data):
     data["executables"] = [Executable.import_from_dict(executable_data) for executable_data in data["executables"]]
     data["executables"] = dict([(executable.filename, executable) for executable in data["executables"]])
     data["testcases"] = [Testcase.import_from_dict(testcase_data) for testcase_data in data["testcases"]]
     data["managers"] = [Manager.import_from_dict(manager_data) for manager_data in data["managers"]]
     data["managers"] = dict([(manager.filename, manager) for manager in data["managers"]])
     data["files"] = [File.import_from_dict(file_data) for file_data in data["files"]]
     data["files"] = dict([(file_.filename, file_) for file_ in data["files"]])
     # XXX We convert the key from str to int because it was the key
     # of a JSON object.
     data["evaluations"] = dict((int(k), v) for k, v in data["evaluations"].iteritems())
     return cls(**data)
Beispiel #4
0
 def import_from_dict(cls, data):
     data['files'] = [File.import_from_dict(file_data)
                      for file_data in data['files']]
     data['files'] = dict([(file_.filename, file_)
                           for file_ in data['files']])
     data['managers'] = [Manager.import_from_dict(manager_data)
                         for manager_data in data['managers']]
     data['managers'] = dict([(manager.filename, manager)
                              for manager in data['managers']])
     data['executables'] = [Executable.import_from_dict(executable_data)
                            for executable_data in data['executables']]
     data['executables'] = dict([(executable.filename, executable)
                                 for executable in data['executables']])
     return cls(**data)
Beispiel #5
0
 def import_from_dict(cls, data):
     data['executables'] = [Executable.import_from_dict(executable_data)
                            for executable_data in data['executables']]
     data['executables'] = dict([(executable.filename, executable)
                                 for executable in data['executables']])
     data['testcases'] = [Testcase.import_from_dict(testcase_data)
                          for testcase_data in data['testcases']]
     data['managers'] = [Manager.import_from_dict(manager_data)
                         for manager_data in data['managers']]
     data['managers'] = dict([(manager.filename, manager)
                              for manager in data['managers']])
     data['files'] = [File.import_from_dict(file_data)
                      for file_data in data['files']]
     data['files'] = dict([(file_.filename, file_)
                           for file_ in data['files']])
     return cls(**data)