def write_rorp_iter_to_file(rorp_iter, file): for rorp in rorp_iter: file.write(MetadataFile._object_to_record(rorp))
def testRORP2Record(self): """Test turning RORPs into records and back again""" for rp in self.get_rpaths(): record = MetadataFile._object_to_record(rp) new_rorp = RorpExtractor._record_to_object(record) assert new_rorp == rp, (new_rorp, rp, record)