[Python-checkins] cpython (3.2): test_pydoc: skip PydocServerTest if thread support is disabled
victor.stinner
python-checkins at python.org
Fri May 20 02:30:03 CEST 2011
http://hg.python.org/cpython/rev/6907c75de4c4
changeset: 70219:6907c75de4c4
branch: 3.2
parent: 70215:a043d8e168b3
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Fri May 20 02:29:13 2011 +0200
summary:
test_pydoc: skip PydocServerTest if thread support is disabled
files:
Lib/test/test_pydoc.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py
--- a/Lib/test/test_pydoc.py
+++ b/Lib/test/test_pydoc.py
@@ -20,6 +20,11 @@
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__
@@ -403,6 +408,7 @@
self.assertIn(expected, pydoc.render_doc(c))
+ at unittest.skipUnless(threading, 'Threading required for this test.')
class PydocServerTest(unittest.TestCase):
"""Tests for pydoc._start_server"""
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list