(self)
| 124 | self.assertEqual(bz2f.read(), self.TEXT * 5) |
| 125 | |
| 126 | def testReadMonkeyMultiStream(self): |
| 127 | # Test BZ2File.read() on a multi-stream archive where a stream |
| 128 | # boundary coincides with the end of the raw read buffer. |
| 129 | buffer_size = _streams.BUFFER_SIZE |
| 130 | _streams.BUFFER_SIZE = len(self.DATA) |
| 131 | try: |
| 132 | self.createTempFile(streams=5) |
| 133 | with BZ2File(self.filename) as bz2f: |
| 134 | self.assertRaises(TypeError, bz2f.read, float()) |
| 135 | self.assertEqual(bz2f.read(), self.TEXT * 5) |
| 136 | finally: |
| 137 | _streams.BUFFER_SIZE = buffer_size |
| 138 | |
| 139 | def testReadTrailingJunk(self): |
| 140 | self.createTempFile(suffix=self.BAD_DATA) |
nothing calls this directly
no test coverage detected