summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_doctest2.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-10-04 05:27:00 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-10-04 05:27:00 (GMT)
commit2f93e28a19e3f250e8c19f9f4334cfa76f5e3645 (patch)
tree22e884413dc23251e95f9737bd9e14daaf43bd0f /Lib/test/test_doctest2.py
parentf137f75ab82019b7b4db6d45bd69e2c0b155b2eb (diff)
downloadcpython-2f93e28a19e3f250e8c19f9f4334cfa76f5e3645.zip
cpython-2f93e28a19e3f250e8c19f9f4334cfa76f5e3645.tar.gz
cpython-2f93e28a19e3f250e8c19f9f4334cfa76f5e3645.tar.bz2
SF bug [#467331] ClassType.__doc__ always None.
For a dynamically constructed type object, fill in the tp_doc slot with a copy of the argument dict's "__doc__" value, provided the latter exists and is a string. NOTE: I don't know what to do if it's a Unicode string, so in that case tp_doc is left NULL (which shows up as Py_None if you do Class.__doc__). Note that tp_doc holds a char*, not a general PyObject*.
Diffstat (limited to 'Lib/test/test_doctest2.py')
-rw-r--r--Lib/test/test_doctest2.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/Lib/test/test_doctest2.py b/Lib/test/test_doctest2.py
index 9a0e57c..00b6cc4 100644
--- a/Lib/test/test_doctest2.py
+++ b/Lib/test/test_doctest2.py
@@ -7,7 +7,6 @@ yup
import test_support
-# XXX The class docstring is skipped.
class C(object):
"""Class C.
@@ -29,7 +28,6 @@ class C(object):
"""
return "42"
- # XXX The class docstring is skipped.
class D(object):
"""A nested D class.
@@ -96,9 +94,7 @@ class C(object):
def test_main():
import test_doctest2
- # XXX 2 class docstrings are skipped.
- # EXPECTED = 19
- EXPECTED = 17
+ EXPECTED = 19
f, t = test_support.run_doctest(test_doctest2)
if t != EXPECTED:
raise test_support.TestFailed("expected %d tests to run, not %d" %