diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2003-02-12 23:09:53 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2003-02-12 23:09:53 (GMT) |
commit | 7cbd247af6a94e156ace46c0f77c038a68e04523 (patch) | |
tree | 0edddb402b516a861698b8f2e52b7f9bda711065 /Lib/test/test_bz2.py | |
parent | ad05cdfa1f3e2ddee87cdbcf212a6983dc5d982b (diff) | |
download | cpython-7cbd247af6a94e156ace46c0f77c038a68e04523.zip cpython-7cbd247af6a94e156ace46c0f77c038a68e04523.tar.gz cpython-7cbd247af6a94e156ace46c0f77c038a68e04523.tar.bz2 |
Add test to ensure files (fds) don't leak
Diffstat (limited to 'Lib/test/test_bz2.py')
-rw-r--r-- | Lib/test/test_bz2.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py index e7c188d..9134aae 100644 --- a/Lib/test/test_bz2.py +++ b/Lib/test/test_bz2.py @@ -218,6 +218,12 @@ class BZ2FileTest(BaseTest): self.assertEqual(bz2f.read(), self.TEXT) bz2f.close() + def testOpenDel(self): + self.createTempFile() + for i in xrange(10000): + o = BZ2File(self.filename) + del o + class BZ2CompressorTest(BaseTest): def testCompress(self): # "Test BZ2Compressor.compress()/flush()" |