[Python-checkins] python/dist/src/Lib/test test_bz2.py,1.12,1.13

niemeyer@users.sourceforge.net niemeyer@users.sourceforge.net
2003年4月29日 07:53:11 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv11441/Lib/test
Modified Files:
	test_bz2.py 
Log Message:
Applying patch #728656, by logistix, fixing opening of nonexistent
bz2 files. Also, included a testcase for this problem.
Index: test_bz2.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_bz2.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** test_bz2.py	12 Feb 2003 23:09:53 -0000	1.12
--- test_bz2.py	29 Apr 2003 14:53:08 -0000	1.13
***************
*** 220,227 ****
--- 220,232 ----
 
 def testOpenDel(self):
+ # "Test opening and deleting a file many times"
 self.createTempFile()
 for i in xrange(10000):
 o = BZ2File(self.filename)
 del o
+ 
+ def testOpenNonexistent(self):
+ # "Test opening a nonexistent file"
+ self.assertRaises(IOError, BZ2File, "/non/existent")
 
 class BZ2CompressorTest(BaseTest):

AltStyle によって変換されたページ (->オリジナル) /