Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 15c6ed5

Browse files
committed
Issue #20753: Merge with 3.4.
2 parents 6cdcf0d + ad324f6 commit 15c6ed5

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Lib/test/test_robotparser.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
from urllib.error import URLError, HTTPError
55
from urllib.request import urlopen
66
from test import support
7-
import threading
87
from http.server import BaseHTTPRequestHandler, HTTPServer
8+
try:
9+
import threading
10+
except ImportError:
11+
threading = None
912

1013

1114
class RobotTestCase(unittest.TestCase):
@@ -259,6 +262,7 @@ def log_message(self, format, *args):
259262
pass
260263

261264

265+
@unittest.skipUnless(threading, 'threading required for this test')
262266
class PasswordProtectedSiteTestCase(unittest.TestCase):
263267

264268
def setUp(self):

0 commit comments

Comments
 (0)