def testReadlinesNoNewline(self):
    data = b'BZh91AY&SY\xd9b\x89]\x00\x00\x00\x03\x80\x04\x00\x02\x00\x0c\x00 \x00!\x9ah3M\x13<]\xc9\x14\xe1BCe\x8a%t'
    with open(self.filename, 'wb') as f:
        f.write(data)
    with BZ2File(self.filename) as bz2f:
        lines = bz2f.readlines()
    self.assertEqual(lines, [b'Test'])
    with BZ2File(self.filename) as bz2f:
        xlines = list(bz2f.readlines())
    self.assertEqual(xlines, [b'Test'])
def testReadlinesNoNewline(self):
    data = b'BZh91AY&SY\xd9b\x89]\x00\x00\x00\x03\x80\x04\x00\x02\x00\x0c\x00 \x00!\x9ah3M\x13<]\xc9\x14\xe1BCe\x8a%t'
    with open(self.filename, 'wb') as f:
        f.write(data)
    with BZ2File(self.filename) as bz2f:
        lines = bz2f.readlines()
    self.assertEqual(lines, [b'Test'])
    with BZ2File(self.filename) as bz2f:
        xlines = list(bz2f.readlines())
    self.assertEqual(xlines, [b'Test'])