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))
def test_normal(self): utext = 'hello'.encode('utf-8') self.assertEqual('hello', cdiff.decode(utext))