summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2003-02-12 23:09:53 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2003-02-12 23:09:53 (GMT)
commit7cbd247af6a94e156ace46c0f77c038a68e04523 (patch)
tree0edddb402b516a861698b8f2e52b7f9bda711065 /Lib/test
parentad05cdfa1f3e2ddee87cdbcf212a6983dc5d982b (diff)
downloadcpython-7cbd247af6a94e156ace46c0f77c038a68e04523.zip
cpython-7cbd247af6a94e156ace46c0f77c038a68e04523.tar.gz
cpython-7cbd247af6a94e156ace46c0f77c038a68e04523.tar.bz2
Add test to ensure files (fds) don't leak
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_bz2.py6
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()"