def test_y(self): from _testcapi import getargs_y self.assertRaises(TypeError, getargs_y, 'abc\xe9') self.assertEqual(getargs_y(b'bytes'), b'bytes') self.assertRaises(TypeError, getargs_y, b'nul:\0') self.assertRaises(TypeError, getargs_y, bytearray(b'bytearray')) self.assertRaises(TypeError, getargs_y, memoryview(b'memoryview')) self.assertRaises(TypeError, getargs_y, None)
def test_y(self): from _testcapi import getargs_y self.assertRaises(TypeError, getargs_y, 'abc\xe9') self.assertEqual(getargs_y(b'bytes'), b'bytes') self.assertRaises(ValueError, getargs_y, b'nul:\0') self.assertRaises(TypeError, getargs_y, bytearray(b'bytearray')) self.assertRaises(TypeError, getargs_y, memoryview(b'memoryview')) self.assertRaises(TypeError, getargs_y, None)
def test_y(self): from _testcapi import getargs_y self.assertRaises(TypeError, getargs_y, "abc\xe9") self.assertEqual(getargs_y(b"bytes"), b"bytes") self.assertRaises(ValueError, getargs_y, b"nul:\0") self.assertRaises(TypeError, getargs_y, bytearray(b"bytearray")) self.assertRaises(TypeError, getargs_y, memoryview(b"memoryview")) self.assertRaises(TypeError, getargs_y, None)