Home | History | Annotate | Download | only in test

Lines Matching refs:codecname

26 codecname = 'testcodec'
30 self.assertEqual(str(b'abc', codecname), 'abc')
31 self.assertEqual(str(b'xdef', codecname), 'abcdef')
32 self.assertEqual(str(b'defx', codecname), 'defabc')
33 self.assertEqual(str(b'dxf', codecname), 'dabcf')
34 self.assertEqual(str(b'dxfx', codecname), 'dabcfabc')
37 self.assertEqual('abc'.encode(codecname), b'abc')
38 self.assertEqual('xdef'.encode(codecname), b'abcdef')
39 self.assertEqual('defx'.encode(codecname), b'defabc')
40 self.assertEqual('dxf'.encode(codecname), b'dabcf')
41 self.assertEqual('dxfx'.encode(codecname), b'dabcfabc')
44 self.assertEqual(str(b'ydef', codecname), 'def')
45 self.assertEqual(str(b'defy', codecname), 'def')
46 self.assertEqual(str(b'dyf', codecname), 'df')
47 self.assertEqual(str(b'dyfy', codecname), 'df')
50 self.assertRaises(UnicodeError, str, b'abc\001', codecname)