diff options
author | Georg Brandl <georg@python.org> | 2006-08-14 21:42:55 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-08-14 21:42:55 (GMT) |
commit | 3335a7ad63092d232098fec292cf9b3a25c66a83 (patch) | |
tree | f2295faf6d6fb32d537ca1e94237ecd1d3dabbce /Lib/test/test_bz2.py | |
parent | 2463f8f831bdf7ed562a26a13a6214f203f0b037 (diff) | |
download | cpython-3335a7ad63092d232098fec292cf9b3a25c66a83.zip cpython-3335a7ad63092d232098fec292cf9b3a25c66a83.tar.gz cpython-3335a7ad63092d232098fec292cf9b3a25c66a83.tar.bz2 |
Patch #1535500: fix segfault in BZ2File.writelines and make sure it
raises the correct exceptions.
Diffstat (limited to 'Lib/test/test_bz2.py')
-rw-r--r-- | Lib/test/test_bz2.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py index 56b5ffa..35eae1e 100644 --- a/Lib/test/test_bz2.py +++ b/Lib/test/test_bz2.py @@ -166,6 +166,8 @@ class BZ2FileTest(BaseTest): 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() |