summaryrefslogtreecommitdiff
path: root/Lib/test/test_robotparser.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-06-29 15:54:56 +0300
committerBerker Peksag <berker.peksag@gmail.com>2014-06-29 15:54:56 +0300
commit14a6d00bcfb3bb0ff9c8d0ecd7ea70286e828b5f (patch)
tree7105b704205a8b3bfcb00ae9eca40430aed58ebe /Lib/test/test_robotparser.py
parenta8e0cac0aa70a448051834937b4654f49b1557da (diff)
downloadcpython-14a6d00bcfb3bb0ff9c8d0ecd7ea70286e828b5f.tar.gz
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 68a5e9ce2f..d01266f330 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):