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_doctest2.py b/Lib/test/test_doctest2.py
index 865a32e..8c043ba 100644
--- a/Lib/test/test_doctest2.py
+++ b/Lib/test/test_doctest2.py
@@ -12,7 +12,11 @@
 
 """
 
+import sys
+import unittest
 from test import test_support
+if sys.flags.optimize >= 2:
+    raise unittest.SkipTest("Cannot test docstrings with -O2")
 
 class C(object):
     u"""Class C.