tests/run-tests.py
changeset 25156 c87257002598
parent 25155 6ab5a1c9ea3c
child 25157 a8d22895a575
equal deleted inserted replaced
25155:6ab5a1c9ea3c 25156:c87257002598
    78 
    78 
    79 processlock = threading.Lock()
    79 processlock = threading.Lock()
    80 
    80 
    81 if sys.version_info > (3, 0, 0):
    81 if sys.version_info > (3, 0, 0):
    82     xrange = range # we use xrange in one place, and we'd rather not use range
    82     xrange = range # we use xrange in one place, and we'd rather not use range
    83 
       
    84 # subprocess._cleanup can race with any Popen.wait or Popen.poll on py24
       
    85 # http://bugs.python.org/issue1731717 for details. We shouldn't be producing
       
    86 # zombies but it's pretty harmless even if we do.
       
    87 if sys.version_info < (2, 5):
       
    88     subprocess._cleanup = lambda: None
       
    89 
    83 
    90 def checkportisavailable(port):
    84 def checkportisavailable(port):
    91     """return true if a port seems free to bind on localhost"""
    85     """return true if a port seems free to bind on localhost"""
    92     try:
    86     try:
    93         s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    87         s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)