[IronPython] Descriptive reports in unittest module

Kamil Dworakowski kamil at dworakowski.name
Sat Dec 20 15:41:05 CET 2008


Do you just want better test names? Maybe this will help:

http://blog.kamil.dworakowski.name/2008/04/camelcasesplit-t-i-n-g.html

On Thu, Dec 18, 2008 at 2:57 PM, Yash Ganthe <yashgt at gmail.com> wrote:
> I am using the unittest module in IronPython 2.0.
>
> My TestClass has a function named testLoginWithInvalidUsername. I would like
> to attach a string to this function so that if the test fails, the string
> would be printed as:
> Failed : Testing the login functionality with invalid user name
> I am not asking for something that will automatically figure out the string
> to be printed. I am looking for a way for me to attach an attribute to the
> test function so that the string in the attribute gets printed.
>
> Is there something readily avaliable for doing this?
>
> Currently my test report comes out as:
> testDateDiffWeek (PI.GetMessages.GetMessagesTestClass) ... ok
> testGetMessageGUIDnull (PI.GetMessages.GetMessagesTestClass) ... FAIL
>
> Thanks,
> Yash
>
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>



More information about the Ironpython-users mailing list