import urllib.error
import urllib.request
import sys
+
try:
import ssl
except ImportError:
ssl = None
+requires_ssl = unittest.skipIf(ssl is None, "SSL not supported")
+
support.requires("network")
TIMEOUT = 60 # seconds
## self._test_urls(urls, self._extra_handlers()+[bauth, dauth])
+ @requires_ssl
def test_urlwithfrag(self):
urlwith_frag = "https://docs.python.org/2/glossary.html#glossary"
with support.transient_internet(urlwith_frag):
self.assertEqual(res.geturl(),
"https://docs.python.org/2/glossary.html#glossary")
+ @requires_ssl
def test_redirect_url_withfrag(self):
redirect_url_with_frag = "http://bit.ly/1iSHToT"
with support.transient_internet(redirect_url_with_frag):
- Issue #22448: Improve canceled timer handles cleanup to prevent
unbound memory usage. Patch by Joshua Moore-Oliva.
+Tests
+-----
+
+- Issue #21456: Skip two tests in test_urllib2net.py if _ssl module not
+ present. Patch by Remi Pointel.
+
Build
-----