[Python-checkins] python/dist/src/Lib/test test_doctest.py,1.5,1.6

tim_one at users.sourceforge.net tim_one at users.sourceforge.net
Wed Aug 4 20:47:06 CEST 2004


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16195/Lib/test

Modified Files:
	test_doctest.py 
Log Message:
Edward Loper's cool and massive refactoring of doctest.py, merged from
the tim-doctest-merge-24a2 tag on the the tim-doctest-branch branch.
We did development on the branch in case it wouldn't land in time for
2.4a2, but the branch looked good:  Edward's tests passed there, ditto
Python's tests, and ditto the Zope3 tests.  Together, those hit doctest
heavily.


Index: test_doctest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_doctest.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_doctest.py	23 Jul 2002 19:03:50 -0000	1.5
--- test_doctest.py	4 Aug 2004 18:46:33 -0000	1.6
***************
*** 1,3 ****
! import doctest
  from test import test_support
! test_support.run_doctest(doctest)
--- 1,1003 ----
! """
! Test script for doctest.
! """
! 
  from test import test_support
! import doctest
[...977 lines suppressed...]
!     test_support.run_doctest(doctest, verbosity=True)
!     # Check the doctest cases defined here:
!     from test import test_doctest
!     test_support.run_doctest(test_doctest, verbosity=True)
! 
! import trace, sys, re, StringIO
! def test_coverage(coverdir):
!     tracer = trace.Trace(ignoredirs=[sys.prefix, sys.exec_prefix,],
!                          trace=0, count=1)
!     tracer.run('reload(doctest); test_main()')
!     r = tracer.results()
!     print 'Writing coverage results...'
!     r.write_results(show_missing=True, summary=True,
!                     coverdir=coverdir)
! 
! if __name__ == '__main__':
!     if '-c' in sys.argv:
!         test_coverage('/tmp/doctest.cover')
!     else:
!         test_main()



More information about the Python-checkins mailing list