Commit ad324f6b authored by Berker Peksag's avatar Berker Peksag

Issue #20753: Skip PasswordProtectedSiteTestCase when Python is built without threads.

parent f951d28a
...@@ -4,8 +4,11 @@ import urllib.robotparser ...@@ -4,8 +4,11 @@ import urllib.robotparser
from urllib.error import URLError, HTTPError from urllib.error import URLError, HTTPError
from urllib.request import urlopen from urllib.request import urlopen
from test import support from test import support
import threading
from http.server import BaseHTTPRequestHandler, HTTPServer from http.server import BaseHTTPRequestHandler, HTTPServer
try:
import threading
except ImportError:
threading = None
class RobotTestCase(unittest.TestCase): class RobotTestCase(unittest.TestCase):
...@@ -259,6 +262,7 @@ class RobotHandler(BaseHTTPRequestHandler): ...@@ -259,6 +262,7 @@ class RobotHandler(BaseHTTPRequestHandler):
pass pass
@unittest.skipUnless(threading, 'threading required for this test')
class PasswordProtectedSiteTestCase(unittest.TestCase): class PasswordProtectedSiteTestCase(unittest.TestCase):
def setUp(self): def setUp(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment