[code.view]

[top] / python / PyMOTW / doctest / doctest_ndiff.py

     #!/usr/bin/env python
     # encoding: utf-8
     #
     # Copyright (c) 2010 Doug Hellmann.  All rights reserved.
     #
     """Whitespace at the end of a line can cause a mis-match.
     """
     #end_pymotw_header
     
     def my_function(a, b):
         """
         >>> my_function(2, 3) #doctest: +REPORT_NDIFF
         6 
         >>> my_function('a', 3)
         'aaa'
         """
         return a * b
     

[top] / python / PyMOTW / doctest / doctest_ndiff.py

contact | logmethods.com