On Feb 15, 2007, at 2:59 PM, Raymond Hettinger wrote: > * Enhance doctest with a method that computes updated doctest > results. If the > only change I make to a matrix suite is to add commas to long > numbers in the > matrix repr(), then it would be nice to have an automated way to > update the > matrix output on all the other test cases in the module.
A while back I wrote up a command-line doctest driver that does this and more [1]. The output of "doctest_driver.py --help" is below; note in particular the --update and --debug options. I also wrote an emacs mode [2] that has support for running doctest & putting the output (^c^c) or diffs (^c^d) in an output buffer; and for updating the output of selected examples (^c^r). I never really got around to doing official releases for either (although doctest-mode.el is part of the python-mode.el package). I could move some of this code into the doctest mode, if it seems appropriate; or I could just go ahead and release the driver and publicize it. -Edward [1] http://nltk.svn.sourceforge.net/viewvc/nltk/trunk/nltk/nltk_lite/ test/doctest_driver.py?view=markup [2] http://python-mode.svn.sourceforge.net/viewvc/*checkout*/python- mode/trunk/python-mode/doctest-mode.el?revision=424 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com