diff options
author | Christian Heimes <christian@cheimes.de> | 2008-02-03 17:32:13 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-02-03 17:32:13 (GMT) |
commit | fdb6bb56c19c6c0d332d61fb3f6416cf91be2d02 (patch) | |
tree | 50daa60087b151d23b4b27c4bde871aed74734ec | |
parent | 292d351fc1a7dc9feccd412843832808680a631f (diff) | |
download | cpython-fdb6bb56c19c6c0d332d61fb3f6416cf91be2d02.zip cpython-fdb6bb56c19c6c0d332d61fb3f6416cf91be2d02.tar.gz cpython-fdb6bb56c19c6c0d332d61fb3f6416cf91be2d02.tar.bz2 |
Fixed socketserver tests
-rw-r--r-- | Lib/test/test_socketserver.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_socketserver.py b/Lib/test/test_socketserver.py index 5ae8e6d..6a65b6c 100644 --- a/Lib/test/test_socketserver.py +++ b/Lib/test/test_socketserver.py @@ -190,28 +190,28 @@ class SocketServerTest(unittest.TestCase): for svrcls in servers: addr = self.pickaddr(proto) if verbose: - print "ADDR =", addr - print "CLASS =", svrcls + print("ADDR =", addr) + print("CLASS =", svrcls) t = ServerThread(addr, svrcls, hdlrcls) - if verbose: print "server created" + if verbose: print("server created") t.start() - if verbose: print "server running" + if verbose: print("server running") for i in range(NREQ): t.ready.wait(10*DELAY) self.assert_(t.ready.isSet(), "Server not ready within a reasonable time") - if verbose: print "test client", i + if verbose: print("test client", i) testfunc(proto, addr) - if verbose: print "waiting for server" + if verbose: print("waiting for server") t.join() - if verbose: print "done" + if verbose: print("done") def stream_examine(self, proto, addr): s = socket.socket(proto, socket.SOCK_STREAM) s.connect(addr) s.sendall(TEST_STR) buf = data = receive(s, 100) - while data and '\n' not in buf: + while data and b'\n' not in buf: data = receive(s, 100) buf += data self.assertEquals(buf, TEST_STR) @@ -221,7 +221,7 @@ class SocketServerTest(unittest.TestCase): s = socket.socket(proto, socket.SOCK_DGRAM) s.sendto(TEST_STR, addr) buf = data = receive(s, 100) - while data and '\n' not in buf: + while data and b'\n' not in buf: data = receive(s, 100) buf += data self.assertEquals(buf, TEST_STR) |