(self)
| 236 | self.assertEqual(list(iter(bz2f)), self.TEXT_LINES * 5) |
| 237 | |
| 238 | def testClosedIteratorDeadlock(self): |
| 239 | # Issue #3309: Iteration on a closed BZ2File should release the lock. |
| 240 | self.createTempFile() |
| 241 | bz2f = BZ2File(self.filename) |
| 242 | bz2f.close() |
| 243 | self.assertRaises(ValueError, next, bz2f) |
| 244 | # This call will deadlock if the above call failed to release the lock. |
| 245 | self.assertRaises(ValueError, bz2f.readlines) |
| 246 | |
| 247 | def testWrite(self): |
| 248 | with BZ2File(self.filename, "w") as bz2f: |
nothing calls this directly
no test coverage detected