[Python-checkins] cpython (2.7): Add test for BZ2Decompressor.decompress("") after end of stream.

nadeem.vawda python-checkins at python.org
Sun Oct 28 15:22:39 CET 2012


http://hg.python.org/cpython/rev/e57e9fb3843b
changeset:   80035:e57e9fb3843b
branch:      2.7
parent:      80032:7784008e9ade
user:        Nadeem Vawda <nadeem.vawda at gmail.com>
date:        Sun Oct 28 15:20:35 2012 +0100
summary:
  Add test for BZ2Decompressor.decompress("") after end of stream.

files:
  Lib/test/test_bz2.py |  1 +
  1 files changed, 1 insertions(+), 0 deletions(-)


diff --git a/Lib/test/test_bz2.py b/Lib/test/test_bz2.py
--- a/Lib/test/test_bz2.py
+++ b/Lib/test/test_bz2.py
@@ -398,6 +398,7 @@
         bz2d = BZ2Decompressor()
         text = bz2d.decompress(self.DATA)
         self.assertRaises(EOFError, bz2d.decompress, "anything")
+        self.assertRaises(EOFError, bz2d.decompress, "")
 
     @bigmemtest(_4G, memuse=1.25)
     def testBigmem(self, size):

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list