Author: christian.heimes Date: Sun Feb 3 18:32:13 2008 New Revision: 60554
Modified: python/branches/py3k/Lib/test/test_socketserver.py Log: Fixed socketserver tests Modified: python/branches/py3k/Lib/test/test_socketserver.py ============================================================================== --- python/branches/py3k/Lib/test/test_socketserver.py (original) +++ python/branches/py3k/Lib/test/test_socketserver.py Sun Feb 3 18:32:13 2008 @@ -190,28 +190,28 @@ 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 @@ 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) _______________________________________________ Python-3000-checkins mailing list Python-3000-checkins@python.org http://mail.python.org/mailman/listinfo/python-3000-checkins