> [OP] What is the proper way to test (using unit test) a method that print > information? > [...]
Fredrik Lundh <[EMAIL PROTECTED]> writes: > > Scott David Daniels wrote: > >> For silly module myprog.py: >> def A(s): >> print '---'+s+'---' >> in test_myprog.py: >> import unittest >> from cStringIO import StringIO # or from StringIO ... > > why are you trying to reinvent doctest ? The OP asked for unit test. This could be read that the OP wants to use module unittest. -- http://mail.python.org/mailman/listinfo/python-list