unit test for a printing method

Fredrik Lundh fredrik at pythonware.com
Mon Aug 28 15:28:12 EDT 2006


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 ?

</F>




More information about the Python-list mailing list