]> granicus.if.org Git - python/commitdiff
A test of SSL support, using a roundabout method suggested by Guido.
authorBarry Warsaw <barry@python.org>
Mon, 20 Aug 2001 22:39:42 +0000 (22:39 +0000)
committerBarry Warsaw <barry@python.org>
Mon, 20 Aug 2001 22:39:42 +0000 (22:39 +0000)
However, this is only enabled with regrtest's --use=network switch.

Lib/test/test_socket_ssl.py [new file with mode: 0644]

diff --git a/Lib/test/test_socket_ssl.py b/Lib/test/test_socket_ssl.py
new file mode 100644 (file)
index 0000000..86d4fa3
--- /dev/null
@@ -0,0 +1,13 @@
+# Test just the SSL support in the socket module, in a moderately bogus way.
+
+import test_support
+
+# Optionally test SSL support.  This currently requires the 'network' resource
+# as given on the regrtest command line.  If not available, nothing after this
+# line will be executed.
+test_support.requires('network')
+
+import socket
+import urllib
+
+urllib.urlopen('https://sf.net')