All of the normal doctest-mode editing functionality becomes available whenever your cursor is inside a docstring. The normal doctest-mode execution functionality is also available. If you type "control-c control-c" to run doctest-execute, then all examples in the entire buffer will be run. |
Regression Tests for math ========================= This is a mock-up file containing some regression tests for the Python `math module`_. .. _math module: http://docs.python.org/lib/module-math.html >>> from math import * Make sure that `math.floor()` handles negative numbers correctly: >>> [floor(x) for x in (-2.0, -1.5, -1.0, 1.0, 1.5, 2.0)] [-2.0, -2.0, -1.0, 1.0, 1.0, 2.0]. Check for rounding errors on round trips: >>> print sin(asin(0.5)), cos(acos(0.5)) 0.5 0.5 ISO8---Emacs: mytest.rst (reST MMM Font)----L14--All----------- All doctest examples passed! |