# "Test opening a nonexistent file"
self.assertRaises(IOError, BZ2File, "/non/existent")
+ def testModeU(self):
+ # Bug #1194181: bz2.BZ2File opened for write with mode "U"
+ self.createTempFile()
+ bz2f = BZ2File(self.filename, "U")
+ bz2f.close()
+ f = file(self.filename)
+ f.seek(0, 2)
+ self.assertEqual(f.tell(), len(self.DATA))
+ f.close()
+
class BZ2CompressorTest(BaseTest):
def testCompress(self):
# "Test BZ2Compressor.compress()/flush()"
Extension Modules
-----------------
+- Bug #1194181: bz2.BZ2File didn't handle mode 'U' correctly.
+
- Patch #1212117: os.stat().st_flags is now accessible as a attribute
if available on the platform.