summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket_ssl.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2001-08-20 22:39:42 (GMT)
committerBarry Warsaw <barry@python.org>2001-08-20 22:39:42 (GMT)
commitd1ed15edb35f61d3ce321b53f3372bc227d150c8 (patch)
treea8e399f31b13141befc960d917d69f2470abe593 /Lib/test/test_socket_ssl.py
parent7fdfc3885c17247983cc7ad63db5c5e96efbdb8b (diff)
downloadcpython-d1ed15edb35f61d3ce321b53f3372bc227d150c8.zip
cpython-d1ed15edb35f61d3ce321b53f3372bc227d150c8.tar.gz
cpython-d1ed15edb35f61d3ce321b53f3372bc227d150c8.tar.bz2
A test of SSL support, using a roundabout method suggested by Guido.
However, this is only enabled with regrtest's --use=network switch.
Diffstat (limited to 'Lib/test/test_socket_ssl.py')
-rw-r--r--Lib/test/test_socket_ssl.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/test_socket_ssl.py b/Lib/test/test_socket_ssl.py
new file mode 100644
index 0000000..86d4fa3
--- /dev/null
+++ b/Lib/test/test_socket_ssl.py
@@ -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')