(self)
| 134 | self.assertEqual(bz2f.read(), self.TEXT * 5) |
| 135 | |
| 136 | def testReadMonkeyMultiStream(self): |
| 137 | # Test BZ2File.read() on a multi-stream archive where a stream |
| 138 | # boundary coincides with the end of the raw read buffer. |
| 139 | buffer_size = _streams.BUFFER_SIZE |
| 140 | _streams.BUFFER_SIZE = len(self.DATA) |
| 141 | try: |
| 142 | self.createTempFile(streams=5) |
| 143 | with BZ2File(self.filename) as bz2f: |
| 144 | self.assertRaises(TypeError, bz2f.read, float()) |
| 145 | self.assertEqual(bz2f.read(), self.TEXT * 5) |
| 146 | finally: |
| 147 | _streams.BUFFER_SIZE = buffer_size |
| 148 | |
| 149 | def testReadTrailingJunk(self): |
| 150 | self.createTempFile(suffix=self.BAD_DATA) |
nothing calls this directly
no test coverage detected