Mercurial > cpython-lru_cache-weakref
diff Lib/difflib.py @ 29891:9ca291865f9c legacy-trunk
Fix faulty doctests. There is no results attribute.
Note, these tests were not getting exercised because
doctest skips over private functions.
| author | Raymond Hettinger <python@rcn.com> |
|---|---|
| date | Wed, 16 Jul 2003 04:32:32 +0000 |
| parents | fa4cf878c538 |
| children | 3e3fd56ce595 |
line wrap: on
line diff
--- a/Lib/difflib.py Wed Jul 16 04:29:42 2003 +0000 +++ b/Lib/difflib.py Wed Jul 16 04:32:32 2003 +0000 @@ -915,8 +915,9 @@ 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 @@ 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'
