On Mar 23, 5:18 am, "killkolor" <[EMAIL PROTECTED]> wrote:
> I have .. a single function that ..
> works with files (takes input and outputs in the same file, no return
> values).
That function could cause problems. If your function reads in the
whole file, modifies the data, and then overwrites
Jorgen Grahn <[EMAIL PROTECTED]> wrote:
> On 23 Mar 2007 12:19:15 GMT, Duncan Booth
> <[EMAIL PROTECTED]> wrote:
>> "killkolor" <[EMAIL PROTECTED]> wrote:
>>
>>> I have a unittest framework that tests a single function that in
>>> turn works with files (takes input and outputs in the same file, n
On 23 Mar 2007 12:19:15 GMT, Duncan Booth <[EMAIL PROTECTED]> wrote:
> "killkolor" <[EMAIL PROTECTED]> wrote:
>
>> I have a unittest framework that tests a single function that in turn
>> works with files (takes input and outputs in the same file, no return
>> values).
>
> I would want to split tha
gabriel> Is there something like a finally for unittest functions?
TestCase instances have setUp() and tearDown() methods:
http://docs.python.org/dev/lib/testcase-objects.html
Skip
--
http://mail.python.org/mailman/listinfo/python-list
I went with the TestCase.setUp() function.
Thanks a lot!
--
http://mail.python.org/mailman/listinfo/python-list
"killkolor" <[EMAIL PROTECTED]> wrote:
> I have a unittest framework that tests a single function that in turn
> works with files (takes input and outputs in the same file, no return
> values).
I would want to split that function into two:
a) one which does the processing, but not working with a
killkolor wrote:
> I have a unittest framework that tests a single function that in turn
> works with files (takes input and outputs in the same file, no return
> values).
> In the unittest class I assign a member with all the names of my
> testfiles and a testdirectory. The tests call the functio
On Fri, 23 Mar 2007 04:18:59 -0700, killkolor wrote:
> The problem now is that after each testrun I have to copy "fresh" files
> into the testdirectory, since of course the function already run on all
> the files and made the changes. So I implemented a buffering in the
> unittest functions: buffe
hi!
I have a unittest framework that tests a single function that in turn
works with files (takes input and outputs in the same file, no return
values).
In the unittest class I assign a member with all the names of my
testfiles and a testdirectory. The tests call the function (which
opens and writ