def compare_headerlist_header(self, header_list, header):
for entry in header_list:<EOL><INDENT>name=entry['<STR_LIT:name>'].upper()<EOL>value=entry['<STR_LIT:value>']<EOL>hvalue = header[name]<EOL>if isinstance(hvalue,str):<EOL><INDENT>hvalue = hvalue.strip()<EOL><DEDENT>self.assertEqual(value,hvalue,"<STR_LIT>" % name)<EOL>if '<STR_LIT>' in entry:<EOL><INDENT>self.assertEqual(entry['<STR_LIT>'].strip(),<EOL>header.get_comment(name).strip(),<EOL>"<STR_LIT>" % name)<EOL><DEDENT><DEDENT>
The first is a list of dicts, second a FITSHDR