diff options
Diffstat (limited to 'Lib/test/test_robotparser.py')
-rw-r--r-- | Lib/test/test_robotparser.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_robotparser.py b/Lib/test/test_robotparser.py index 651301b..36ac941 100644 --- a/Lib/test/test_robotparser.py +++ b/Lib/test/test_robotparser.py @@ -2,6 +2,12 @@ import unittest, StringIO, robotparser from test import test_support from urllib2 import urlopen, HTTPError +HAVE_HTTPS = True +try: + from urllib2 import HTTPSHandler +except ImportError: + HAVE_HTTPS = False + class RobotTestCase(unittest.TestCase): def __init__(self, index, parser, url, good, agent): unittest.TestCase.__init__(self) @@ -269,6 +275,7 @@ class NetworkTestCase(unittest.TestCase): self.skipTest('%s is unavailable' % url) self.assertEqual(parser.can_fetch("*", robots_url), False) + @unittest.skipUnless(HAVE_HTTPS, 'need SSL support to download license') def testPythonOrg(self): test_support.requires('network') with test_support.transient_internet('www.python.org'): |