[Python-checkins]
python/dist/src/Lib/test test_doctest.py, 1.5.18.1, 1.5.18.2
tim_one at users.sourceforge.net
tim_one at users.sourceforge.net
Tue Aug 3 05:38:02 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2145/Lib/test
Modified Files:
Tag: tim-doctest-branch
test_doctest.py
Log Message:
Update attributions; whitespace normalization.
Index: test_doctest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_doctest.py,v
retrieving revision 1.5.18.1
retrieving revision 1.5.18.2
diff -C2 -d -r1.5.18.1 -r1.5.18.2
*** test_doctest.py 2 Aug 2004 22:08:53 -0000 1.5.18.1
--- test_doctest.py 3 Aug 2004 03:37:59 -0000 1.5.18.2
***************
*** 24,28 ****
Traceback (most recent call last):
AssertionError
!
>>> # Source spans multiple lines: require terminating newline.
>>> e = doctest.Example('print 1;\nprint 2\n', '1\n2\n', 0)
--- 24,28 ----
Traceback (most recent call last):
AssertionError
!
>>> # Source spans multiple lines: require terminating newline.
>>> e = doctest.Example('print 1;\nprint 2\n', '1\n2\n', 0)
***************
*** 136,140 ****
... '''
... return v+v
!
>>> finder = doctest.DocTestFinder()
>>> tests = finder.find(double)
--- 136,140 ----
... '''
... return v+v
!
>>> finder = doctest.DocTestFinder()
>>> tests = finder.find(double)
***************
*** 151,160 ****
>>> finder.find(no_docstring)
[]
!
If the function has a docstring with no examples, then a test with no
examples is returned. (This lets `DocTestRunner` collect statistics
about which functions have no tests -- but is that useful? And should
an empty test also be created when there's no docstring?)
!
>>> def no_examples(v):
... ''' no doctest examples '''
--- 151,160 ----
>>> finder.find(no_docstring)
[]
!
If the function has a docstring with no examples, then a test with no
examples is returned. (This lets `DocTestRunner` collect statistics
about which functions have no tests -- but is that useful? And should
an empty test also be created when there's no docstring?)
!
>>> def no_examples(v):
... ''' no doctest examples '''
***************
*** 273,277 ****
... 'd': '>>> print 6\n6\n>>> print 7\n7\n',
... 'c': triple}})
!
>>> finder = doctest.DocTestFinder()
>>> # The '(None)' is to prevent it from filtering out objects
--- 273,277 ----
... 'd': '>>> print 6\n6\n>>> print 7\n7\n',
... 'c': triple}})
!
>>> finder = doctest.DocTestFinder()
>>> # The '(None)' is to prevent it from filtering out objects
***************
*** 316,320 ****
!
"""
--- 316,320 ----
!
"""
***************
*** 329,332 ****
if __name__ == '__main__':
test_main()
-
-
--- 329,330 ----
More information about the Python-checkins
mailing list