Lines Matching refs:codecname
24 codecname = 'testcodec' variable
33 self.assertEqual(str(b'abc', codecname), 'abc')
34 self.assertEqual(str(b'xdef', codecname), 'abcdef')
35 self.assertEqual(str(b'defx', codecname), 'defabc')
36 self.assertEqual(str(b'dxf', codecname), 'dabcf')
37 self.assertEqual(str(b'dxfx', codecname), 'dabcfabc')
40 self.assertEqual('abc'.encode(codecname), b'abc')
41 self.assertEqual('xdef'.encode(codecname), b'abcdef')
42 self.assertEqual('defx'.encode(codecname), b'defabc')
43 self.assertEqual('dxf'.encode(codecname), b'dabcf')
44 self.assertEqual('dxfx'.encode(codecname), b'dabcfabc')
47 self.assertEqual(str(b'ydef', codecname), 'def')
48 self.assertEqual(str(b'defy', codecname), 'def')
49 self.assertEqual(str(b'dyf', codecname), 'df')
50 self.assertEqual(str(b'dyfy', codecname), 'df')
53 self.assertRaises(UnicodeError, str, b'abc\001', codecname)