mirror of https://github.com/python/cpython.git
Fix faulty doctests. There is no results attribute.
Note, these tests were not getting exercised because doctest skips over private functions.
This commit is contained in:
parent
f3590623e9
commit
83325e9087
|
@ -915,8 +915,9 @@ def _fancy_replace(self, a, alo, ahi, b, blo, bhi):
|
|||
Example:
|
||||
|
||||
>>> d = Differ()
|
||||
>>> d._fancy_replace(['abcDefghiJkl\n'], 0, 1, ['abcdefGhijkl\n'], 0, 1)
|
||||
>>> print ''.join(d.results),
|
||||
>>> results = d._fancy_replace(['abcDefghiJkl\n'], 0, 1,
|
||||
... ['abcdefGhijkl\n'], 0, 1)
|
||||
>>> print ''.join(results),
|
||||
- abcDefghiJkl
|
||||
? ^ ^ ^
|
||||
+ abcdefGhijkl
|
||||
|
@ -1022,9 +1023,9 @@ def _qformat(self, aline, bline, atags, btags):
|
|||
Example:
|
||||
|
||||
>>> d = Differ()
|
||||
>>> d._qformat('\tabcDefghiJkl\n', '\t\tabcdefGhijkl\n',
|
||||
... ' ^ ^ ^ ', '+ ^ ^ ^ ')
|
||||
>>> for line in d.results: print repr(line)
|
||||
>>> results = d._qformat('\tabcDefghiJkl\n', '\t\tabcdefGhijkl\n',
|
||||
... ' ^ ^ ^ ', '+ ^ ^ ^ ')
|
||||
>>> for line in results: print repr(line)
|
||||
...
|
||||
'- \tabcDefghiJkl\n'
|
||||
'? \t ^ ^ ^\n'
|
||||
|
|
Loading…
Reference in New Issue