summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-11-21 22:09:45 (GMT)
committerGuido van Rossum <guido@python.org>2007-11-21 22:09:45 (GMT)
commit8a392d7387c9992537b0e1f66de989e34bd4eb4e (patch)
tree689dd92ee0ca56b2464982cb07b398af03f81f19 /Lib/test/test_socket.py
parentb08340053cb10af7290628ed624e4f7ec6be398b (diff)
downloadcpython-8a392d7387c9992537b0e1f66de989e34bd4eb4e.zip
cpython-8a392d7387c9992537b0e1f66de989e34bd4eb4e.tar.gz
cpython-8a392d7387c9992537b0e1f66de989e34bd4eb4e.tar.bz2
Convert the socket module to insist on bytes for input, and to return bytes
(not bytearray) on output. Discovered a bunch of places that were still depending on it accepting text strings.
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index c01d998..97445a0 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -498,7 +498,7 @@ class GeneralModuleTests(unittest.TestCase):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(1)
sock.close()
- self.assertRaises(socket.error, sock.send, "spam")
+ self.assertRaises(socket.error, sock.send, b"spam")
def testNewAttributes(self):
# testing .family, .type and .protocol