summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pydoc.py
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2010-02-24 01:46:21 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2010-02-24 01:46:21 (GMT)
commit378c0cf5abb4c49c1a95597d3c5284dc93dd7822 (patch)
tree0a7c9a724887dff98a5abefd9b09da0de6889731 /Lib/test/test_pydoc.py
parent72aee3dcabf98a0b8a7a60cccab4fbd1ef63fbd2 (diff)
downloadcpython-378c0cf5abb4c49c1a95597d3c5284dc93dd7822.zip
cpython-378c0cf5abb4c49c1a95597d3c5284dc93dd7822.tar.gz
cpython-378c0cf5abb4c49c1a95597d3c5284dc93dd7822.tar.bz2
Merged revisions 78351 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78351 | r.david.murray | 2010-02-22 19:24:49 -0500 (Mon, 22 Feb 2010) | 5 lines Issue 6292: for the moment at least, the test suite passes if run with -OO. Tests requiring docstrings are skipped. Patch by Brian Curtin, thanks to Matias Torchinsky for helping review and improve the patch. ........
Diffstat (limited to 'Lib/test/test_pydoc.py')
-rw-r--r--Lib/test/test_pydoc.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py
index 5d99e43..bfa99e7 100644
--- a/Lib/test/test_pydoc.py
+++ b/Lib/test/test_pydoc.py
@@ -236,6 +236,8 @@ def print_diffs(text1, text2):
class PyDocDocTest(unittest.TestCase):
+ @unittest.skipIf(sys.flags.optimize >= 2,
+ "Docstrings are omitted with -O2 and above")
def test_html_doc(self):
result, doc_loc = get_pydoc_html(pydoc_mod)
mod_file = inspect.getabsfile(pydoc_mod)
@@ -249,6 +251,8 @@ class PyDocDocTest(unittest.TestCase):
print_diffs(expected_html, result)
self.fail("outputs are not equal, see diff above")
+ @unittest.skipIf(sys.flags.optimize >= 2,
+ "Docstrings are omitted with -O2 and above")
def test_text_doc(self):
result, doc_loc = get_pydoc_text(pydoc_mod)
expected_text = expected_text_pattern % \