summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-08-17 03:51:09 (GMT)
committerGuido van Rossum <guido@python.org>2007-08-17 03:51:09 (GMT)
commit540d987d3485c39649edcd20a990bb35a6b86a3b (patch)
tree9260755fb37d6e6ce5f3ecd36b40d4557182f3e9
parentda97cd0081faa710d1ce691ab646e2da01855f25 (diff)
downloadcpython-540d987d3485c39649edcd20a990bb35a6b86a3b.zip
cpython-540d987d3485c39649edcd20a990bb35a6b86a3b.tar.gz
cpython-540d987d3485c39649edcd20a990bb35a6b86a3b.tar.bz2
Fix the IPv6 pton/ntop tests. Why weren't these failing on Linux? No IPv6?
-rw-r--r--Lib/test/test_socket.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 6a12952..e955bff 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -424,9 +424,9 @@ class GeneralModuleTests(unittest.TestCase):
return
f = lambda a: inet_pton(AF_INET6, a)
- self.assertEquals('\x00' * 16, f('::'))
- self.assertEquals('\x00' * 16, f('0::0'))
- self.assertEquals('\x00\x01' + '\x00' * 14, f('1::'))
+ self.assertEquals(b'\x00' * 16, f('::'))
+ self.assertEquals(b'\x00' * 16, f('0::0'))
+ self.assertEquals(b'\x00\x01' + b'\x00' * 14, f('1::'))
self.assertEquals(
b'\x45\xef\x76\xcb\x00\x1a\x56\xef\xaf\xeb\x0b\xac\x19\x24\xae\xae',
f('45ef:76cb:1a:56ef:afeb:bac:1924:aeae')
@@ -458,8 +458,8 @@ class GeneralModuleTests(unittest.TestCase):
return
f = lambda a: inet_ntop(AF_INET6, a)
- self.assertEquals('::', f('\x00' * 16))
- self.assertEquals('::1', f('\x00' * 15 + '\x01'))
+ self.assertEquals('::', f(b'\x00' * 16))
+ self.assertEquals('::1', f(b'\x00' * 15 + b'\x01'))
self.assertEquals(
'aef:b01:506:1001:ffff:9997:55:170',
f(b'\x0a\xef\x0b\x01\x05\x06\x10\x01\xff\xff\x99\x97\x00\x55\x01\x70')