Exemplo n.º 1
0
    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")
Exemplo n.º 2
0
    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")
Exemplo n.º 3
0
    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")
Exemplo n.º 4
0
 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")
Exemplo n.º 5
0
    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")
Exemplo n.º 6
0
    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")