mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fix test cases for doctest.
This commit is contained in:
parent
5284b532d1
commit
ecf93c765c
2 changed files with 4 additions and 0 deletions
|
@ -2476,6 +2476,7 @@ def script_from_examples(s):
|
||||||
blah
|
blah
|
||||||
#
|
#
|
||||||
# Ho hum
|
# Ho hum
|
||||||
|
<BLANKLINE>
|
||||||
"""
|
"""
|
||||||
output = []
|
output = []
|
||||||
for piece in DocTestParser().parse(s):
|
for piece in DocTestParser().parse(s):
|
||||||
|
|
|
@ -1517,6 +1517,7 @@ words and expected output are converted to comments:
|
||||||
## 44
|
## 44
|
||||||
#
|
#
|
||||||
# Yee ha!
|
# Yee ha!
|
||||||
|
<BLANKLINE>
|
||||||
|
|
||||||
>>> name = 'test.test_doctest.SampleNewStyleClass'
|
>>> name = 'test.test_doctest.SampleNewStyleClass'
|
||||||
>>> print doctest.testsource(test.test_doctest, name)
|
>>> print doctest.testsource(test.test_doctest, name)
|
||||||
|
@ -1525,6 +1526,7 @@ words and expected output are converted to comments:
|
||||||
## 1
|
## 1
|
||||||
## 2
|
## 2
|
||||||
## 3
|
## 3
|
||||||
|
<BLANKLINE>
|
||||||
|
|
||||||
>>> name = 'test.test_doctest.SampleClass.a_classmethod'
|
>>> name = 'test.test_doctest.SampleClass.a_classmethod'
|
||||||
>>> print doctest.testsource(test.test_doctest, name)
|
>>> print doctest.testsource(test.test_doctest, name)
|
||||||
|
@ -1534,6 +1536,7 @@ words and expected output are converted to comments:
|
||||||
print SampleClass(0).a_classmethod(10)
|
print SampleClass(0).a_classmethod(10)
|
||||||
# Expected:
|
# Expected:
|
||||||
## 12
|
## 12
|
||||||
|
<BLANKLINE>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def test_debug(): r"""
|
def test_debug(): r"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue