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:
Raymond Hettinger 2003-07-16 04:32:32 +00:00
parent f3590623e9
commit 83325e9087
1 changed files with 6 additions and 5 deletions

View File

@ -915,8 +915,9 @@ class Differ:
Example: Example:
>>> d = Differ() >>> d = Differ()
>>> d._fancy_replace(['abcDefghiJkl\n'], 0, 1, ['abcdefGhijkl\n'], 0, 1) >>> results = d._fancy_replace(['abcDefghiJkl\n'], 0, 1,
>>> print ''.join(d.results), ... ['abcdefGhijkl\n'], 0, 1)
>>> print ''.join(results),
- abcDefghiJkl - abcDefghiJkl
? ^ ^ ^ ? ^ ^ ^
+ abcdefGhijkl + abcdefGhijkl
@ -1022,9 +1023,9 @@ class Differ:
Example: Example:
>>> d = Differ() >>> d = Differ()
>>> d._qformat('\tabcDefghiJkl\n', '\t\tabcdefGhijkl\n', >>> results = d._qformat('\tabcDefghiJkl\n', '\t\tabcdefGhijkl\n',
... ' ^ ^ ^ ', '+ ^ ^ ^ ') ... ' ^ ^ ^ ', '+ ^ ^ ^ ')
>>> for line in d.results: print repr(line) >>> for line in results: print repr(line)
... ...
'- \tabcDefghiJkl\n' '- \tabcDefghiJkl\n'
'? \t ^ ^ ^\n' '? \t ^ ^ ^\n'