Kaydet (Commit) 83325e90 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Fix faulty doctests. There is no results attribute.

Note, these tests were not getting exercised because
doctest skips over private functions.
üst f3590623
......@@ -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'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment