[Python-checkins] r46906 - python/trunk/Lib/test/test_asynchat.py

neal.norwitz python-checkins at python.org
Tue Jun 13 06:08:54 CEST 2006


Author: neal.norwitz
Date: Tue Jun 13 06:08:53 2006
New Revision: 46906

Modified:
   python/trunk/Lib/test/test_asynchat.py
Log:
Don't fail if another process is listening on our port.

Modified: python/trunk/Lib/test/test_asynchat.py
==============================================================================
--- python/trunk/Lib/test/test_asynchat.py	(original)
+++ python/trunk/Lib/test/test_asynchat.py	Tue Jun 13 06:08:53 2006
@@ -13,7 +13,8 @@
     def run(self):
         sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
         sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
-        sock.bind((HOST, PORT))
+        global PORT
+        PORT = test_support.bind_port(sock, HOST, PORT)
         sock.listen(1)
         conn, client = sock.accept()
         buffer = ""


More information about the Python-checkins mailing list