summaryrefslogtreecommitdiff
path: root/Lib/test/test_pydoc.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-20 02:29:55 +0200
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-20 02:29:55 +0200
commitba8ef7a81d5a2ee09713a273c156abf839c7b21b (patch)
tree42aa248ad50946748f6392fc18e78ef28f77cb63 /Lib/test/test_pydoc.py
parent4050c69f78a9cfb9b16fe7a1bfae8e9fbda89024 (diff)
parent62a68f2dbe2c33c57d5840f38105dc11e33a77b7 (diff)
downloadcpython-git-ba8ef7a81d5a2ee09713a273c156abf839c7b21b.tar.gz
(Merge 3.2) test_pydoc: skip PydocServerTest if thread support is disabled
Diffstat (limited to 'Lib/test/test_pydoc.py')
-rw-r--r--Lib/test/test_pydoc.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py
index 6dca0c9e05..7d17a98410 100644
--- a/Lib/test/test_pydoc.py
+++ b/Lib/test/test_pydoc.py
@@ -20,6 +20,11 @@ from test.support import TESTFN, forget, rmtree, EnvironmentVarGuard, \
from test import pydoc_mod
+try:
+ import threading
+except ImportError:
+ threading = None
+
# Just in case sys.modules["test"] has the optional attribute __loader__.
if hasattr(pydoc_mod, "__loader__"):
del pydoc_mod.__loader__
@@ -409,6 +414,7 @@ class TestDescriptions(unittest.TestCase):
self.assertIn(expected, pydoc.render_doc(c))
+@unittest.skipUnless(threading, 'Threading required for this test.')
class PydocServerTest(unittest.TestCase):
"""Tests for pydoc._start_server"""