summaryrefslogtreecommitdiffstats
path: root/Lib/test/sample_doctest_no_doctests.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-09-10 14:15:58 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-09-10 14:15:58 (GMT)
commit5abd76a75d633a1ba6f5fcc66b0bc4799b9e2eaa (patch)
treef5f595962bd537e345bb6b567e8bc3cd6a14418e /Lib/test/sample_doctest_no_doctests.py
parent01beb69c7dacc0a59acd568239322716da6e55d0 (diff)
downloadcpython-5abd76a75d633a1ba6f5fcc66b0bc4799b9e2eaa.zip
cpython-5abd76a75d633a1ba6f5fcc66b0bc4799b9e2eaa.tar.gz
cpython-5abd76a75d633a1ba6f5fcc66b0bc4799b9e2eaa.tar.bz2
#14649: clarify DocTestSuite error when there are no docstrings.
Also adds tests to verify the documented behavior (which is probably a bug, as indicated in the added comments). Patch by Chris Jerdonek.
Diffstat (limited to 'Lib/test/sample_doctest_no_doctests.py')
-rw-r--r--Lib/test/sample_doctest_no_doctests.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/Lib/test/sample_doctest_no_doctests.py b/Lib/test/sample_doctest_no_doctests.py
new file mode 100644
index 0000000..7daa572
--- /dev/null
+++ b/Lib/test/sample_doctest_no_doctests.py
@@ -0,0 +1,15 @@
+"""This is a sample module used for testing doctest.
+
+This module is for testing how doctest handles a module with docstrings
+but no doctest examples.
+
+"""
+
+
+class Foo(object):
+ """A docstring with no doctest examples.
+
+ """
+
+ def __init__(self):
+ pass