bpo-30106: Fix test_asyncore.test_quick_connect() by vstinner · Pull Request #1234 · python/cpython
server = BaseServer(self.family, self.addr) # run the thread 500 ms: the socket should be connected in 200 ms t = threading.Thread(target=lambda: asyncore.loop(timeout=0.1, count=500)) count=5)) t.start() try: with socket.socket(self.family, socket.SOCK_STREAM) as s: