mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Issue #20753: Skip PasswordProtectedSiteTestCase when Python is built without threads.
This commit is contained in:
parent
f951d28ac8
commit
ad324f6bcc
1 changed files with 5 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue