'Decompressed data buffering should be limited'

def test_decompress_limited(self):

    bomb = lzma.compress(('\x00' * int(2000000.0)), preset=6)
    self.assertLess(len(bomb), _compression.BUFFER_SIZE)
    decomp = LZMAFile(BytesIO(bomb))
    self.assertEqual(decomp.read(1), '\x00')
    max_decomp = (1 + DEFAULT_BUFFER_SIZE)
    self.assertLessEqual(decomp._buffer.raw.tell(), max_decomp, 'Excessive    amount    of    data    was    decompressed')
