On 2007-02-08, Brian van den Broek <[EMAIL PROTECTED]> wrote:
> All classes take an optional argument input_function that
> determines how the class instance gets its input. If this is
> not provided, it defaults to raw_input. doctest tests reassign
> it so that they can be run automatically.

What I've done in these cases is create a file containing my test
input, and before running the doctests I remap sys.stdin to my
file of test data. Then you don't need test code cluttering up
your functions.

-- 
Neil Cerutti
We don't necessarily discriminate.  We simply exclude certain types of people.
--Colonel Gerald Wellman
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to