mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
Enabled fromhex('') test for bytes
This commit is contained in:
parent
5f63d18657
commit
4f066126d6
1 changed files with 1 additions and 3 deletions
|
@ -242,9 +242,7 @@ class BaseBytesTest(unittest.TestCase):
|
|||
def test_fromhex(self):
|
||||
self.assertRaises(TypeError, self.type2test.fromhex)
|
||||
self.assertRaises(TypeError, self.type2test.fromhex, 1)
|
||||
# To be fixed
|
||||
if self.type2test != bytes:
|
||||
self.assertEquals(self.type2test.fromhex(''), self.type2test())
|
||||
self.assertEquals(self.type2test.fromhex(''), self.type2test())
|
||||
b = bytearray([0x1a, 0x2b, 0x30])
|
||||
self.assertEquals(self.type2test.fromhex('1a2B30'), b)
|
||||
self.assertEquals(self.type2test.fromhex(' 1A 2B 30 '), b)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue