summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-07-16 04:32:32 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-07-16 04:32:32 (GMT)
commit83325e9087e1072cd51fed09896dc92a524db781 (patch)
treeba6451b85bf82e39cd9239f32f88ee6f1ad94841
parentf3590623e9fe5c918709634cfca28d30fb444b7c (diff)
downloadcpython-83325e9087e1072cd51fed09896dc92a524db781.zip
cpython-83325e9087e1072cd51fed09896dc92a524db781.tar.gz
cpython-83325e9087e1072cd51fed09896dc92a524db781.tar.bz2
Fix faulty doctests. There is no results attribute.
Note, these tests were not getting exercised because doctest skips over private functions.
-rw-r--r--Lib/difflib.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/difflib.py b/Lib/difflib.py
index eb0eccf..a45c0bc 100644
--- a/Lib/difflib.py
+++ b/Lib/difflib.py
@@ -915,8 +915,9 @@ class Differ:
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 @@ class Differ:
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'