Doctest Mode: Walk-Through (5/8)

Put your cursor on the line containing the first example, and type "control-c control-r". This tells doctest-mode to replace the example's "expected output" (i.e., the output listed in the doctest file) with its "actual output" (i.e., the output generated when the example was run in Python). doctest-mode displays a confirmation message.

Hit "y" to confirm, and doctest-mode will update your doctest file with the correct output.

Next Page...

Hello world.  This file will contain some simple tests.

.   >>> len('european swallow')
    >>> 'european swallow'.count('a')
    >>> for word in 'european swallow'.split():
    ...     print word, len(word)













ISO8---Emacs: mytest.doctest  (Doctest Font Fill)----L2--All-----
Replace nothing
With:
    16
ISO8---Emacs: *doctest-confirm*  (Fundamental)----L1--All--------
Ok to replace? (y or n) .