diff options
author | Guido van Rossum <guido@python.org> | 2007-05-08 19:09:34 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-05-08 19:09:34 (GMT) |
commit | 57b93ad56d570c27bd3de3820b996352121c18e2 (patch) | |
tree | dbdce68ef3995086ec14d57493573029a9037ab6 /Lib/test/test_bytes.py | |
parent | e5e80b8c561de3a13154fa45eafcb32b8695eea7 (diff) | |
download | cpython-57b93ad56d570c27bd3de3820b996352121c18e2.zip cpython-57b93ad56d570c27bd3de3820b996352121c18e2.tar.gz cpython-57b93ad56d570c27bd3de3820b996352121c18e2.tar.bz2 |
repr(b"\0") should return b"\x00", not the (unusual) b"\0".
Diffstat (limited to 'Lib/test/test_bytes.py')
-rw-r--r-- | Lib/test/test_bytes.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index 102eb46..ded0491 100644 --- a/Lib/test/test_bytes.py +++ b/Lib/test/test_bytes.py @@ -73,8 +73,9 @@ class BytesTest(unittest.TestCase): def test_repr(self): self.assertEqual(repr(bytes()), "b''") - self.assertEqual(repr(bytes([0])), "b'\\0'") - self.assertEqual(repr(bytes([0, 1, 254, 255])), "b'\\0\\x01\\xfe\\xff'") + self.assertEqual(repr(bytes([0])), "b'\\x00'") + self.assertEqual(repr(bytes([0, 1, 254, 255])), + "b'\\x00\\x01\\xfe\\xff'") self.assertEqual(repr(bytes('abc')), "b'abc'") self.assertEqual(repr(bytes("'")), "b'\\''") |