def testReadMonkeyMultiStream(self):
    buffer_size = _compression.BUFFER_SIZE
    _compression.BUFFER_SIZE = len(self.DATA)
    try:
        self.createTempFile(streams=5)
        with BZ2File(self.filename) as bz2f:
            self.assertRaises(TypeError, bz2f.read, float())
            self.assertEqual(bz2f.read(), (self.TEXT * 5))
    finally:
        _compression.BUFFER_SIZE = buffer_size
def testReadMonkeyMultiStream(self):
    buffer_size = _compression.BUFFER_SIZE
    _compression.BUFFER_SIZE = len(self.DATA)
    try:
        self.createTempFile(streams=5)
        with BZ2File(self.filename) as bz2f:
            self.assertRaises(TypeError, bz2f.read, float())
            self.assertEqual(bz2f.read(), (self.TEXT * 5))
    finally:
        _compression.BUFFER_SIZE = buffer_size