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

nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
Mon, 17 Feb 2003 10:05:24 -0800


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv9924/Lib/test

Modified Files:
	test_zipimport.py 
Log Message:
Use correct function name to PyArg_ParseTuple("is_package").

Fix off-by-1 error in normalize_line_endings():
  when *p == '\0' the NUL was copied into q and q was auto-incremented,
  the loop was broken out of,
  then a newline was appended followed by a NUL.
  So the function, in effect, was strcpy() but added two extra chars
  which was caught by obmalloc in debug mode, since there was only
  room for 1 additional newline.

Get test working under regrtest (added test_main).


Index: test_zipimport.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_zipimport.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_zipimport.py	9 Jan 2003 22:27:10 -0000	1.5
--- test_zipimport.py	17 Feb 2003 18:05:20 -0000	1.6
***************
*** 187,191 ****
  
  
! if __name__ == "__main__":
      test_support.run_unittest(UncompressedZipImportTestCase)
      test_support.run_unittest(CompressedZipImportTestCase)
--- 187,194 ----
  
  
! def test_main():
      test_support.run_unittest(UncompressedZipImportTestCase)
      test_support.run_unittest(CompressedZipImportTestCase)
+ 
+ if __name__ == "__main__":
+     test_main()