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.
........
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
index 67d76be..ede793a 100644
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -236,6 +236,8 @@
         self.assertEqual(functions, [('eggs', mod.eggs),
                                      ('spam', mod.spam)])
 
+    @unittest.skipIf(sys.flags.optimize >= 2,
+                     "Docstrings are omitted with -O2 and above")
     def test_getdoc(self):
         self.assertEqual(inspect.getdoc(mod), 'A module docstring.')
         self.assertEqual(inspect.getdoc(mod.StupidGit),