Author: Armin Rigo <[email protected]>
Branch:
Changeset: r89603:297ff07dc274
Date: 2017-01-16 08:42 +0100
http://bitbucket.org/pypy/pypy/changeset/297ff07dc274/
Log: Revert to gmail.com again because verisign makes test_connection
pass but most other tests fail :-(
Work around the fact that the first connection attempt fails from
some machines.
diff --git a/pypy/module/_ssl/test/test_ssl.py
b/pypy/module/_ssl/test/test_ssl.py
--- a/pypy/module/_ssl/test/test_ssl.py
+++ b/pypy/module/_ssl/test/test_ssl.py
@@ -175,8 +175,8 @@
}
def setup_method(self, method):
- # https://www.verisign.net/
- ADDR = "www.verisign.net", 443
+ # https://gmail.com/
+ ADDR = "gmail.com", 443
self.w_s = self.space.appexec([self.space.wrap(ADDR)], """(ADDR):
import socket
@@ -194,6 +194,17 @@
from ..interp_ssl import SOCKET_STORAGE
SOCKET_STORAGE._dict.clear()
+ def test_warmup_connection(self):
+ # not sure it is gmail.com's fault, but on some machines the
+ # very first connection attempt fails. So we make one here and
+ # ignore the result. The first real test is test_connect().
+ import socket, ssl
+ try:
+ ss = socket.ssl(self.s)
+ self.s.close()
+ except ssl.SSLError:
+ pass
+
def test_connect(self):
import socket, gc
ss = socket.ssl(self.s)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit