From: Victor Stinner Date: Fri, 20 May 2011 00:29:13 +0000 (+0200) Subject: test_pydoc: skip PydocServerTest if thread support is disabled X-Git-Tag: v3.2.1rc2~144 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=62a68f2dbe2c33c57d5840f38105dc11e33a77b7;p=thirdparty%2FPython%2Fcpython.git test_pydoc: skip PydocServerTest if thread support is disabled --- diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py index bcddff3ec7be..08ba86e697be 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__ @@ -403,6 +408,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"""