allowing output of code that is unittested?

per perfreem at
Wed Jul 15 22:54:02 CEST 2009

hi all,

i am using the standard unittest module to unit test my code. my code
contains several print statements which i noticed are repressed when i
call my unit tests using:

if __name__ == '__main__':
    suite = unittest.TestLoader().loadTestsFromTestCase(TestMyCode)

is there a way to allow all the print statements in the code that is
being run by the unit test functions to be printed to stdio?  i want
to be able to see the output of the tested code, in addition to the
output of the unit testing framework.

thank you.

More information about the Python-list mailing list