bz2 files. Also, included a testcase for this problem.
bz2f.close()
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):
def testCompress(self):
# "Test BZ2Compressor.compress()/flush()"
break;
}
Util_DropReadAhead(self);
- Py_DECREF(self->file);
+ Py_XDECREF(self->file);
self->ob_type->tp_free((PyObject *)self);
}