'Decompressed data buffering should be limited'

def test_decompress_limited(self):

    bomb = gzip.compress(('\x00' * int(2000000.0)), compresslevel=9)
    self.assertLess(len(bomb), io.DEFAULT_BUFFER_SIZE)
    bomb = io.BytesIO(bomb)
    decomp = gzip.GzipFile(fileobj=bomb)
    self.assertEqual(decomp.read(1), '\x00')
    max_decomp = (1 + io.DEFAULT_BUFFER_SIZE)
    self.assertLessEqual(decomp._buffer.raw.tell(), max_decomp, 'Excessive    amount    of    data    was    decompressed')
