[Python-checkins] python/dist/src/Lib/test test_compiler.py, 1.4, 1.5

tim_one at users.sourceforge.net tim_one at users.sourceforge.net
Sun Aug 8 18:44:01 CEST 2004


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

Modified Files:
	test_compiler.py 
Log Message:
Tell unittest that source files with "badsyntax" in their names should
raise SyntaxError.  test_compiler passes now on WinXP, at least in a
release-build non-O run.


Index: test_compiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_compiler.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** test_compiler.py	8 Aug 2004 16:37:37 -0000	1.4
--- test_compiler.py	8 Aug 2004 16:43:59 -0000	1.5
***************
*** 25,29 ****
                  buf = f.read()
                  f.close()
!                 compiler.compile(buf, basename, "exec")
  
  def test_main():
--- 25,33 ----
                  buf = f.read()
                  f.close()
!                 if "badsyntax" in basename:
!                     self.assertRaises(SyntaxError, compiler.compile,
!                                       buf, basename, "exec")
!                 else:
!                     compiler.compile(buf, basename, "exec")
  
  def test_main():



More information about the Python-checkins mailing list