Lines Matching refs:getargs_et
832 from _testcapi import getargs_et
833 self.assertEqual(getargs_et('abc\xe9'), b'abc\xc3\xa9')
834 self.assertEqual(getargs_et('abc\xe9', 'latin1'), b'abc\xe9')
835 self.assertRaises(UnicodeEncodeError, getargs_et, 'abc\xe9', 'ascii')
836 self.assertRaises(LookupError, getargs_et, 'abc\xe9', 'spam')
837 self.assertEqual(getargs_et(b'bytes', 'latin1'), b'bytes')
838 self.assertEqual(getargs_et(bytearray(b'bytearray'), 'latin1'), b'bytearray')
839 self.assertRaises(TypeError, getargs_et, memoryview(b'memoryview'), 'latin1')
840 self.assertRaises(TypeError, getargs_et, None, 'latin1')
841 self.assertRaises(TypeError, getargs_et, 'nul:\0', 'latin1')
842 self.assertRaises(TypeError, getargs_et, b'nul:\0', 'latin1')
843 self.assertRaises(TypeError, getargs_et, bytearray(b'nul:\0'), 'latin1')