summaryrefslogtreecommitdiffstats
path: root/Lib/test/sample_doctest.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-08-07 05:37:52 (GMT)
committerTim Peters <tim.peters@gmail.com>2004-08-07 05:37:52 (GMT)
commit1e277ee3bd76b82d74214ab2a415a3516c168cfa (patch)
treea700c8191004d24b3e89c0ffa4554335f6cf0960 /Lib/test/sample_doctest.py
parent2a7dedef9e3d94fbbad3782fd4757c6b7ba91c09 (diff)
downloadcpython-1e277ee3bd76b82d74214ab2a415a3516c168cfa.zip
cpython-1e277ee3bd76b82d74214ab2a415a3516c168cfa.tar.gz
cpython-1e277ee3bd76b82d74214ab2a415a3516c168cfa.tar.bz2
Bug 772091: doctest.DocTestSuite does not support __test__
This got fixed "by magic" as part of the refactoring, but wasn't tested as such. Now it is.
Diffstat (limited to 'Lib/test/sample_doctest.py')
-rw-r--r--Lib/test/sample_doctest.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/Lib/test/sample_doctest.py b/Lib/test/sample_doctest.py
index 25a1d37..e5adee0 100644
--- a/Lib/test/sample_doctest.py
+++ b/Lib/test/sample_doctest.py
@@ -1,9 +1,9 @@
"""This is a sample module that doesn't really test anything all that
- interesting
+ interesting.
-It simply has a few tests, some of which suceed and some of which fail.
+It simply has a few tests, some of which succeed and some of which fail.
-It's important that the numbers remain constance, as another test is
+It's important that the numbers remain constant as another test is
testing the running of these tests.
@@ -61,6 +61,16 @@ def y_is_one():
1
"""
+__test__ = {'good': """
+ >>> 42
+ 42
+ """,
+ 'bad': """
+ >>> 42
+ 666
+ """,
+ }
+
def test_suite():
import doctest
return doctest.DocTestSuite()