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_descr.py b/Lib/test/test_descr.py
index 8ec03087..536d70a 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -2057,6 +2057,9 @@
else:
self.fail("expected ZeroDivisionError from bad property")
+ @unittest.skipIf(sys.flags.optimize >= 2,
+ "Docstrings are omitted with -O2 and above")
+ def test_properties_doc_attrib(self):
class E(object):
def getter(self):
"getter method"
@@ -2069,6 +2072,7 @@
prop2 = property(fset=setter)
self.assertEqual(prop2.__doc__, None)
+ def test_testcapi_no_segfault(self):
# this segfaulted in 2.5b2
try:
import _testcapi