Пример #1
0
 def test_latin_1(self):
     text = '\x80\x02q\x01(U'
     if sys.version_info[0] == 2:
         decoded_text = text.decode('latin-1')
     else:
         decoded_text = text
     self.assertEqual(decoded_text, cdiff.decode(text))
Пример #2
0
 def test_latin_1(self):
     text = '\x80\x02q\x01(U'
     if sys.version_info[0] == 2:
         decoded_text = text.decode('latin-1')
     else:
         decoded_text = text
     self.assertEqual(decoded_text, cdiff.decode(text))
Пример #3
0
 def test_normal(self):
     utext = 'hello'.encode('utf-8')
     self.assertEqual('hello', cdiff.decode(utext))
Пример #4
0
 def test_normal(self):
     utext = 'hello'.encode('utf-8')
     self.assertEqual('hello', cdiff.decode(utext))