Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_bz2.py @ 39496:352ffe77b71d legacy-trunk
Patch #1535500: fix segfault in BZ2File.writelines and make sure it
raises the correct exceptions.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Mon, 14 Aug 2006 21:42:55 +0000 |
| parents | 3bfef3db32b3 |
| children | 9d64bd748320 |
line wrap: on
line diff
--- a/Lib/test/test_bz2.py Mon Aug 14 21:34:08 2006 +0000 +++ b/Lib/test/test_bz2.py Mon Aug 14 21:42:55 2006 +0000 @@ -166,6 +166,8 @@ sio = StringIO(self.TEXT) bz2f.writelines(sio.readlines()) bz2f.close() + # patch #1535500 + self.assertRaises(ValueError, bz2f.writelines, ["a"]) f = open(self.filename, 'rb') self.assertEqual(self.decompress(f.read()), self.TEXT) f.close()
