def test_get_font_key_size(self): perl_file = "perl_output/f_font_key" f = file(self.res_file, "wb") try: f.write(self.format.get_font_key()) finally: f.close() self.assertEqual(os.path.getsize(perl_file), os.path.getsize(self.res_file), \ "Bad file size") contents = read_file(perl_file) rcontents = read_file(self.res_file) self.assertEqual(contents, rcontents, "Contents not the same")
def test_font_biff_size(self): perl_file = "perl_output/f_font_biff" f = file(self.res_file, "wb") try: f.write(self.format.get_font()) finally: f.close() contents = read_file(perl_file) rcontents = read_file(self.res_file) self.assertEqual(contents, rcontents, "Contents not the same") contents = read_file(perl_file) rcontents = read_file(self.res_file) self.assertEqual(contents, rcontents, "Contents not the same")
def test_xf_biff_size(self): perl_file = "perl_output/f_xf_biff" size = os.path.getsize(perl_file) f = file(self.res_file, "wb") try: f.write(self.format.get_xf()) finally: f.close() rsize = os.path.getsize(self.res_file) self.assertEqual(size, rsize, "File sizes not the same") contents = read_file(perl_file) rcontents = read_file(self.res_file) self.assertEqual(contents, rcontents, "Contents not the same")