summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_robotparser.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-06-29 12:54:56 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2014-06-29 12:54:56 (GMT)
commitad324f6bccfe50b31b0c0769f4aa382baef42f91 (patch)
tree69c715b645fb0721210fd63eac28cd051559fd6e /Lib/test/test_robotparser.py
parentf951d28ac890063e3ecef56aa8cf851b1152d9dd (diff)
downloadcpython-ad324f6bccfe50b31b0c0769f4aa382baef42f91.zip
cpython-ad324f6bccfe50b31b0c0769f4aa382baef42f91.tar.gz
cpython-ad324f6bccfe50b31b0c0769f4aa382baef42f91.tar.bz2
Issue #20753: Skip PasswordProtectedSiteTestCase when Python is built without threads.
Diffstat (limited to 'Lib/test/test_robotparser.py')
-rw-r--r--Lib/test/test_robotparser.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_robotparser.py b/Lib/test/test_robotparser.py
index 68a5e9c..d01266f 100644
--- a/Lib/test/test_robotparser.py
+++ b/Lib/test/test_robotparser.py
@@ -4,8 +4,11 @@ import urllib.robotparser
from urllib.error import URLError, HTTPError
from urllib.request import urlopen
from test import support
-import threading
from http.server import BaseHTTPRequestHandler, HTTPServer
+try:
+ import threading
+except ImportError:
+ threading = None
class RobotTestCase(unittest.TestCase):
@@ -259,6 +262,7 @@ class RobotHandler(BaseHTTPRequestHandler):
pass
+@unittest.skipUnless(threading, 'threading required for this test')
class PasswordProtectedSiteTestCase(unittest.TestCase):
def setUp(self):