per schrieb:
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)
unittest.TextTestRunner(verbosity=2).run(suite)
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.
I use nosetests to discover & run tests, and that has an "-s"-option
that does exactly that.
Diez
--
http://mail.python.org/mailman/listinfo/python-list