mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
fix building the core with --disable-unicode
I changed some bytearray methods to use strings instead of unicode like bytes_repr Also, bytearray.fromhex() can take strings as well as unicode
This commit is contained in:
parent
e52c31450d
commit
78821ddf8c
7 changed files with 70 additions and 22 deletions
|
@ -250,7 +250,6 @@ class BaseBytesTest(unittest.TestCase):
|
|||
self.assertEquals(self.type2test.fromhex(u'1a2B30'), b)
|
||||
self.assertEquals(self.type2test.fromhex(u' 1A 2B 30 '), b)
|
||||
self.assertEquals(self.type2test.fromhex(u'0000'), b'\0\0')
|
||||
self.assertRaises(TypeError, self.type2test.fromhex, b'1B')
|
||||
self.assertRaises(ValueError, self.type2test.fromhex, u'a')
|
||||
self.assertRaises(ValueError, self.type2test.fromhex, u'rt')
|
||||
self.assertRaises(ValueError, self.type2test.fromhex, u'1a b cd')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue