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.
This commit is contained in:
Tim Peters 2004-08-07 05:37:52 +00:00
parent 2a7dedef9e
commit 1e277ee3bd
2 changed files with 29 additions and 16 deletions

View file

@ -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()