diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-20 00:29:13 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-20 00:29:13 (GMT) |
commit | 62a68f2dbe2c33c57d5840f38105dc11e33a77b7 (patch) | |
tree | 0e9091863a969f7555537270dd693e06f9dca978 /Lib | |
parent | 4445ec81c17c672b5d245da7a1af0e0294debcc0 (diff) | |
download | cpython-62a68f2dbe2c33c57d5840f38105dc11e33a77b7.zip cpython-62a68f2dbe2c33c57d5840f38105dc11e33a77b7.tar.gz cpython-62a68f2dbe2c33c57d5840f38105dc11e33a77b7.tar.bz2 |
test_pydoc: skip PydocServerTest if thread support is disabled
Diffstat (limited to 'Lib')
-rw-r--r-- | 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 index bcddff3..08ba86e 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""" |