Commit ba8ef7a8 authored by Victor Stinner's avatar Victor Stinner

(Merge 3.2) test_pydoc: skip PydocServerTest if thread support is disabled

parents 4050c69f 62a68f2d
...@@ -20,6 +20,11 @@ from test.support import TESTFN, forget, rmtree, EnvironmentVarGuard, \ ...@@ -20,6 +20,11 @@ from test.support import TESTFN, forget, rmtree, EnvironmentVarGuard, \
from test import pydoc_mod from test import pydoc_mod
try:
import threading
except ImportError:
threading = None
# Just in case sys.modules["test"] has the optional attribute __loader__. # Just in case sys.modules["test"] has the optional attribute __loader__.
if hasattr(pydoc_mod, "__loader__"): if hasattr(pydoc_mod, "__loader__"):
del pydoc_mod.__loader__ del pydoc_mod.__loader__
...@@ -409,6 +414,7 @@ class TestDescriptions(unittest.TestCase): ...@@ -409,6 +414,7 @@ class TestDescriptions(unittest.TestCase):
self.assertIn(expected, pydoc.render_doc(c)) self.assertIn(expected, pydoc.render_doc(c))
@unittest.skipUnless(threading, 'Threading required for this test.')
class PydocServerTest(unittest.TestCase): class PydocServerTest(unittest.TestCase):
"""Tests for pydoc._start_server""" """Tests for pydoc._start_server"""
......
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