diff options
author | Stefan Krah <skrah@bytereef.org> | 2013-01-26 12:57:15 (GMT) |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2013-01-26 12:57:15 (GMT) |
commit | fb931902c8b88e15d5b395cc1de1f063f28cf76b (patch) | |
tree | cf1272a75348e4ceed0a15a0ab094af0cfacffdd /Lib/test/test_pydoc.py | |
parent | 6e572b8b2e34bc88d0485c1ed1c0e4a5157e3a62 (diff) | |
download | cpython-fb931902c8b88e15d5b395cc1de1f063f28cf76b.zip cpython-fb931902c8b88e15d5b395cc1de1f063f28cf76b.tar.gz cpython-fb931902c8b88e15d5b395cc1de1f063f28cf76b.tar.bz2 |
Fix test_pydoc for build --without-doc-strings.
Diffstat (limited to 'Lib/test/test_pydoc.py')
-rw-r--r-- | Lib/test/test_pydoc.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py index 8e2001b..a53e055 100644 --- a/Lib/test/test_pydoc.py +++ b/Lib/test/test_pydoc.py @@ -256,6 +256,7 @@ class PydocDocTest(unittest.TestCase): "Docstrings are omitted with -O2 and above") @unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(), 'trace function introduces __locals__ unexpectedly') + @test.support.requires_docstrings def test_html_doc(self): result, doc_loc = get_pydoc_html(pydoc_mod) mod_file = inspect.getabsfile(pydoc_mod) @@ -273,6 +274,7 @@ class PydocDocTest(unittest.TestCase): "Docstrings are omitted with -O2 and above") @unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(), 'trace function introduces __locals__ unexpectedly') + @test.support.requires_docstrings def test_text_doc(self): result, doc_loc = get_pydoc_text(pydoc_mod) expected_text = expected_text_pattern % \ @@ -327,6 +329,7 @@ class PydocDocTest(unittest.TestCase): 'Docstrings are omitted with -O2 and above') @unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(), 'trace function introduces __locals__ unexpectedly') + @test.support.requires_docstrings def test_help_output_redirect(self): # issue 940286, if output is set in Helper, then all output from # Helper.help should be redirected @@ -496,6 +499,7 @@ class PydocUrlHandlerTest(unittest.TestCase): self.assertRaises(TypeError, f, 'A', '') self.assertRaises(TypeError, f, 'B', 'foobar') + @test.support.requires_docstrings def test_url_requests(self): # Test for the correct title in the html pages returned. # This tests the different parts of the URL handler without |