[IronPython] Descriptive reports in unittest module

Yash Ganthe yashgt at gmail.com
Thu Dec 18 15:57:54 CET 2008


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20081218/1a3d9f22/attachment.html>


More information about the Ironpython-users mailing list