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

tim_one at users.sourceforge.net tim_one at users.sourceforge.net
Wed Aug 4 22:04:39 CEST 2004


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

Modified Files:
	test_doctest.py 
Log Message:
Example.__init__:  this cannot use assert, because that fails to trigger
in a -O run, and so test_doctest was failing under -O.  Simple cause,
simple cure.


Index: test_doctest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_doctest.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** test_doctest.py	4 Aug 2004 18:46:33 -0000	1.6
--- test_doctest.py	4 Aug 2004 20:04:32 -0000	1.7
***************
*** 133,137 ****
      >>> e = doctest.Example('print 1\n', '1\n', 0)
      Traceback (most recent call last):
!     AssertionError
  
      >>> # Source spans multiple lines: require terminating newline.
--- 133,137 ----
      >>> e = doctest.Example('print 1\n', '1\n', 0)
      Traceback (most recent call last):
!     AssertionError: source must end with newline iff source contains more than one line
  
      >>> # Source spans multiple lines: require terminating newline.
***************
*** 139,143 ****
      >>> e = doctest.Example('print 1;\nprint 2', '1\n2\n', 0)
      Traceback (most recent call last):
!     AssertionError
  
  The `want` string should be terminated by a newline, unless it's the
--- 139,143 ----
      >>> e = doctest.Example('print 1;\nprint 2', '1\n2\n', 0)
      Traceback (most recent call last):
!     AssertionError: source must end with newline iff source contains more than one line
  
  The `want` string should be terminated by a newline, unless it's the
***************
*** 147,151 ****
      >>> e = doctest.Example('print 1', '1', 0)
      Traceback (most recent call last):
!     AssertionError
      >>> e = doctest.Example('print', '', 0)
  """
--- 147,151 ----
      >>> e = doctest.Example('print 1', '1', 0)
      Traceback (most recent call last):
!     AssertionError: non-empty want must end with newline
      >>> e = doctest.Example('print', '', 0)
  """



More information about the Python-checkins mailing list