diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -260,7 +260,9 @@ s.bind(('localhost', port)) return True except socket.error as exc: - if exc.errno not in ( + if os.name == 'nt' and exc.errno == errno.WSAEACCES: + return False + elif exc.errno not in ( errno.EADDRINUSE, errno.EADDRNOTAVAIL, errno.EPROTONOSUPPORT,