示例#1
0
def apply_format_string(fields: dict) -> str:
    args = get_args()
    fields = prepare_fields(fields)
    name = tmep.parse(args.rename_format, fields)
    return name
示例#2
0
 def set_field(self, destination_field, format_string):
     field_value = tmep.parse(format_string,
                              self.interface.export_to_dict())
     setattr(self.interface, destination_field, field_value)
示例#3
0
 def write_to_log_file(self, log_file, format_string):
     log = open(log_file, 'w')
     log.write(
         tmep.parse(format_string, self.interface.export_to_dict()) + '\n')
     log.close()
示例#4
0
 def set_field(self, destination_field, format_string):
     field_value = tmep.parse(format_string,
                              self.interface.export_to_dict())
     setattr(self.interface, destination_field, field_value)
示例#5
0
 def write_to_log_file(self, log_file, format_string):
     log = open(log_file, 'w')
     log.write(tmep.parse(format_string, self.interface.export_to_dict()) +
               '\n')
     log.close()
示例#6
0
 def parseEqual(self, a, b):
     self.assertEqual(tmep.parse(a, self.values), b)