unittest

Mag Gam magawake at gmail.com
Sat Aug 15 13:32:15 CEST 2009


So, in this example:

"import random"

In my case I would do "import foo" ? is there anything I need to do for that?




On Sat, Aug 15, 2009 at 2:24 AM, Richard Thomas<chardster at gmail.com> wrote:
> On Aug 15, 4:28 am, Mag Gam <magaw... at gmail.com> wrote:
>> I am writing an application which has many command line arguments.
>> For example: foo.py -args "bar bee"
>>
>> I would like to create a test suit using unittest so when I add
>> features to "foo.py" I don't want to break other things. I just heard
>> about unittest and would love to use it for this type of thing.
>>
>> so my question is, when I do these tests do I have to code them into
>> foo.py? I prefer having a footest.py which will run the regression
>> tests. Any thoughts about this?
>>
>> TIA
>
> You should certainly keep your test suite separate. There's a quick
> example of how to write unit tests in the unittest documentation:
> http://docs.python.org/library/unittest.html#basic-example
>
> Richard.
> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list