コード例 #1
0
def test_text_encode_decode():
    assert encode_text("abc") == b"\xFE\xFF\x00a\x00b\x00c"
    assert decode_text(b"\xFE\xFF\x00a\x00b\x00c") == "abc"
    assert decode_text(b"abc") == "abc"
    assert decode_text(b"\x1B a \x1C") == "\u02D9 a \u02DD"
コード例 #2
0
 def test_text_encode_decode(self):
     self.assertEqual(encode_text("abc"), b"\xFE\xFF\x00a\x00b\x00c")
     self.assertEqual(decode_text(b"\xFE\xFF\x00a\x00b\x00c"), "abc")
     self.assertEqual(decode_text(b"abc"), "abc")
     self.assertEqual(decode_text(b"\x1B a \x1C"), u"\u02D9 a \u02DD")
コード例 #3
0
ファイル: test_pdfparser.py プロジェクト: hugovk/Pillow
 def test_text_encode_decode(self):
     self.assertEqual(encode_text("abc"), b"\xFE\xFF\x00a\x00b\x00c")
     self.assertEqual(decode_text(b"\xFE\xFF\x00a\x00b\x00c"), "abc")
     self.assertEqual(decode_text(b"abc"), "abc")
     self.assertEqual(decode_text(b"\x1B a \x1C"), u"\u02D9 a \u02DD")