- Message from [EMAIL PROTECTED] -
Date: Sun, 10 Aug 2008 14:03:38 -0400
From: Kent Johnson <[EMAIL PROTECTED]>
Reply-To: Kent Johnson <[EMAIL PROTECTED]>
Subject: Re: [Tutor] using generators to mock raw_input for doctest
On Sun, Aug 10, 2008 at 1:38
On Sun, Aug 10, 2008 at 1:38 AM, <[EMAIL PROTECTED]> wrote:
> 2) Is there some better way to enable doctesting of code that uses
> raw_input? All I found when googling was the suggestion that in place of:
>
> def myfunc():
> # code employing raw_input here
>
> one could write:
>
> def myfunc(in
Hi all,
I'm building a tool that will be run in a shell and depends heavily on
raw_input. I'm also using doctest (mostly via doctest.testfile) to
create unit tests for it.
After thinking a while about how to use doctest for invocations of
raw_input, I came up with the general sort of idea shown